On Sunday, August 11, 2019 at 7:11:31 AM UTC-5, Edward K. Ream wrote:

> I plan to put all needed support files in a new leo/plugins/*pyzo_support* 
directory.

Did that yesterday.  It worked.

> Generalizing [the code] is always in my mind.

When I awoke I saw that yesterday's code must indeed be generalized.  Now.

Yesterday's code changed pyzo.config to pyzo_config everywhere in 
pyzo_support.  That's hardly a general solution.

*leo/plugins/pyzo*

The next step will be to create a second, *complete*, copy of pyzo in the 
plugins directory.  Why do that, you ask?

leo/*external*/pyzo is the *reference copy.* It contains useful traces.  It 
won't ever change significantly, and will probably be removed once all 
pyzo-related projects are complete.

leo/*plugins*/pyzo will be the *experimental copy*. The goal will be to 
find the minimal changes needed to adapt pyzo to Leo, not the other way 
around.  To make imports work without changes, the "root" folder must be 
called "pyzo", not pyzo_support.


*De-fanging "import pyzo"*

Almost all of pyzo's modules start with "import pyzo".  This import must be 
made benign. It must init all global data *without* instantiating pyzo's 
editors, shells, tools or servers, etc.

I plan to add a *start_leo_in_pyzo* function somewhere, probably in 
pyzo.__init__.py itself.  This will do all and only what Leo needs.

This is a highly experimental plan. The experimental copy will: reduce 
risk, allow easy reversions of code, and allow me to compare *reference 
traces* with *experimental traces*.

*Summary*

leo/plugins/pyzo will allow me to experiment safely with significant 
changes to pyzo's code, especially pyzo's startup code.

Side effects of "import pyzo" must be eliminated.

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/c36a40e4-e851-4743-b86c-1c3d4bbfbee5%40googlegroups.com.

Reply via email to