Running scripts, including Leo scripts, in a separate process is a recurrent theme of recent work:
1. Imo, it's important that most unit tests succeed when run in a separate process. Some tests can be disabled: they are either meaningless or unimportant when run externally. However, some failures point to real bugs in Leo, or to deficiencies in various "Null" classes. For example, the NullColorizer class has just been improved. 2. The at_produce plugin now has technology for reporting progress using the IdleTime class. This technology should become part of g.execute_shell_commands. New settings will control whether, and how often, to report progress. 3. There will soon be two new functions for running both Leo and non-Leo scripts externally. - g.run_python_script_externally would simply create an external file containing the script and then run python on that file. - g.run_leo_script_externally would do something similar using the Leo bridge. Both functions would be controlled by new settings, including (Kent will be glad) what version of Python. 3. The code that executes Leo's unit tests externally now has much better tracing. This tracing is now enabled when running unit tests externally. Imo, these traces resolve a lot of confusion about just what is going on. 4. I have just now revised leo.core.leoBridgeTest. The docstring makes clear that this is a demo program. This leads me to... 5. The documentation for Leo's bridge, http://leoeditor.com/leoBridge.html, needs revision. There are several ways to run code externally: - Using leo.core.leoBridgeTest. - (When ready) using g.run_leo_script_externally. - Using the full-blown method that Terry discusses in that chapter. Yes, this work will delay Leo 5.0a1 a bit, but that can't be helped. 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 post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
