Embedding Leo into pyzo?

59 views
Skip to first unread message

Edward K. Ream

unread,
Jan 7, 2017, 8:33:07 AM1/7/17
to leo-editor
I've been thinking of this ever since Satish Goda's original PlantUML and pyzo posts.

Yes, it would theoretically be possible to embed Leo into pyzo, but the sane, sensible (and polite) approach is to leave pyzo alone, and make Leo do everything that pyzo can do ;-)

Otoh, for study only, it may be useful to insert traces into the actual pyzo editor.  These will never become public.

Edward

Satish Goda

unread,
Jan 9, 2017, 5:31:49 AM1/9/17
to leo-editor
I think in today's world of disparate software components, It would be really nice to see how Leo's integration component would integrate with Pyzo.

I really wish for a future where plug and play of awesome components from various disciplines will be as easy and painless as possible.

Edward K. Ream

unread,
Jan 11, 2017, 6:32:58 AM1/11/17
to leo-editor
On Mon, Jan 9, 2017 at 5:31 AM, Satish Goda <satis...@gmail.com> wrote:
I think in today's world of disparate software components, It would be really nice to see how Leo's integration component would integrate with Pyzo.

​What do mean by "Leo's integration component"?​
 
 
I really wish for a future where plug and play of awesome components from various disciplines will be as easy and painless as possible.

​That's the holy grail.

EKR

Satish Goda

unread,
Jan 11, 2017, 10:26:15 PM1/11/17
to leo-editor
Hi Edward.

I meant this -> http://leoeditor.com/leoBridge.html

I have not had time to try this inside pyzo, but testing leoBridge within pyzo would be a good test.

Edward K. Ream

unread,
Jan 21, 2017, 9:26:52 AM1/21/17
to leo-editor
On Wed, Jan 11, 2017 at 9:26 PM, Satish Goda <satis...@gmail.com> wrote:
Hi Edward.

I meant this -> http://leoeditor.com/leoBridge.html

I have not had time to try this inside pyzo, but testing leoBridge within pyzo would be a good test.

​I ran the following script within pyzo without problems:

import leo.core.leoBridge as leoBridge

import leo.core.leoGlobals as g


path = r'c:\leo.repo\leo-editor\leo\core\leoPyRef.leo'

assert g.os_path_exists(path), repr(path)


controller = leoBridge.controller(

    gui='nullGui',

    loadPlugins=True,

    readSettings=True,

    silent=False,

    verbose=False)


g = controller.globals()

c = controller.openLeoFile(path)


After executing this I can evaluate, for example, c.p in the shell window, and pretty much do anything else that pyzo can do, but now on Leo data.

EKR
Reply all
Reply to author
Forward
0 new messages