This time around everything things much easier.  There is no need for the 
"let's pretend it's easy principle", because everything *is* easy :-)  No 
more messing with shims or other hacks.  The pyzo_support plugins will 
likely be retired soon.

The pyzo branch will contain work on #1149 
<https://github.com/leo-editor/leo-editor/issues/1149>: pyzo file browser 
and #1158 <https://github.com/leo-editor/leo-editor/issues/1158>: pyzo 
shells.  It contains a complete copy of all of pyzo's sources in 
leo/external/pyzo and sub-folders.  I can modify anything at will.  Here 
are the principles:

*Changes to pyzo*

Initial work on the pyzo file browser used copies of pyzo code.  That gets 
old in a hurry.

Instead, we want to import from leo/external/pyzo.  To do this effectively, 
the key principle is:

   * importing pyzo must not execute pyzo.start*

It's easy.  pyzo.__main__ *never* calls pyzo.start. And we don't want to 
import pyzo/yotonloader.py unless we actually want to start the pyzo shell. 
And that's about it, aside from other minor tweaks.

*Running the code externally*

As a quick check, I want to run the code externally, which will actually 
fire up all of pyzo.  This script does so:

python -c "from leo.external.pyzo import start; start()"

Notice that start must now be called explicitly.  Again, that's all there 
is to it.

*Other details*

1. There is no need to worry about menus or menu shims because they won't 
ever get created.

2. There is no need to worry about pyzo's configuration.  For now, the code 
will have read-only access.  When not running externally I'll just hack the 
code so settings never get written.

*Summary*

All the old problems seem to have disappeared.  I expect that completing 
will take a matter of days.

With the new infrastructure in place, it may even be worth considering 
using pyzo's text editor as Leo's body pane.  That would make integration 
with pyzo's shell easier, and has other advantages.  Otoh, there will be 
substantial work involved.  All such work will be done in the 
leo/external/pyzo directory tree.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/043301ab-cc2c-466d-8008-6696eba4ff7a%40googlegroups.com.

Reply via email to