On Sun, Apr 8, 2018 at 1:54 PM, Viktor Ransmayr <viktor.ransm...@gmail.com> wrote:
> I haven't been able to get them to work. Is it them or me? ;-) >> >> import leo.core.leoGlobals as g >> # g.importFromPath('semantic_version', >> # >> r'C:\Users\mattw\Documents\GitHub\leo-editor\leo\extensions\semantic_version', >> >> # verbose=True) >> # g.importExtension('semantic_version', verbose=True) >> >> g.importModule('semantic_version') >> >> Result: >> >> >python xx-test-semver.py >> Traceback (most recent call last): >> File "xx-test-semver.py", line 13, in <module> >> g.importModule('semantic_version') >> File "C:\Users\mattw\code\leo-editor\leo\core\leoGlobals.py", line 4916 >> , in importModule >> trace = (False or g.app.trace_plugins) and not g.unitTesting >> AttributeError: 'NoneType' object has no attribute 'trace_plugins' >> > > This clearly indicates that g.app is None, which would be so if you execute a script outside of Leo. g.importModule is designed to be executed when g.app *does* exist, that is, from with Leo or a Leo plugin. Furthermore, a cff on importModule shows that it is called from several places. The likelihood that g.importModule is broken is small. HTH. 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 firstname.lastname@example.org. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.