The new --trace-plugins command-line argument makes a lot easier for people 
trying to understand why a particular plugin didn't load.

It eliminates the need to set tracing variables in Leo's core--an important 
advantage.

As a happy side effect, this setting simplifies the corresponding tracing 
conditions in the affected core code.

Furthermore, the tracePlugins keyword argument has now been added in 
various places to the leoBridge module.

Suppose example, suppose leo_bridge_test.py contains::

'''A minimal Leo bridge application'''
# This can not be run locally!
import leo.core.leoBridge as leoBridge
b = leoBridge.controller(
    gui='nullGui',loadPlugins=True,
    silent=False,tracePlugins=True,verbose=False)
g = b.globals()
path = g.os_path_finalize_join(g.app.loadDir,'..','doc','LeoDocs.leo')
assert g.os_path_exists(path)
c = b.openLeoFile(path)
assert c
assert c.rootPosition()

The following script will run this file::

g.cls()
import sys
import subprocess
path = r'c:\Users\edreamleo\test\leo_bridge_test.py'
assert g.os_path_exists(path)
proc = subprocess.Popen([sys.executable,path])
proc.communicate()

And the output will be::

** isPython3: False
Leo 4.11 final, build 20140918100332, Thu Sep 18 10:03:32 CDT 2014
Git repo info: branch = master, commit = cc2a8585870e
Python 2.7.2, LeoGui: dummy version
Windows 7 AMD64 (build 6.1.7601) SP1
reading settings in C:\leo.repo\leo-editor\leo\config\leoSettings.leo
reading settings in c:\Users\edreamleo\.leo\myLeoSettings.leo
loadOnePlugin: failed to load module leo.plugins.plugins_menu
Plugin leo.plugins.bookmarks does not support nullGui gui
Plugin leo.plugins.contextmenu does not support nullGui gui
Plugin leo.plugins.nav_qt does not support nullGui gui
Plugin leo.plugins.quicksearch does not support nullGui gui
loadOnePlugin: failed to load module leo.plugins.richtext
reading settings in C:\leo.repo\leo-editor\leo\doc\LeoDocs.leo
loadOnePlugin: failed to load module leo.plugins.plugins_menu
loadOnePlugin: plugin leo.plugins.mod_scripting already loaded
Plugin leo.plugins.bookmarks does not support nullGui gui
Plugin leo.plugins.contextmenu does not support nullGui gui
Plugin leo.plugins.nav_qt does not support nullGui gui
Plugin leo.plugins.quicksearch does not support nullGui gui
loadOnePlugin: failed to load module leo.plugins.richtext

Finally, recent code changes have eliminated duplicate console messages 
when using the nullGui, as is typical when using the Leo bridge.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to