On Wed, May 16, 2012 at 2:58 PM, Terry Brown <[email protected]> wrote:

> My first thought would be to address the issues preventing
> leo.core.leoGlobals from being imported, but I don't know what those issues 
> are.

The idea is that leo (and thus leo.core.etc) won't necessarily be on
the path for standalone usage.

Maybe it would be best to install a copy of leoGlobals somewhere
"convenient".  The standalone code can then attempt something like
(not tested):

    try:
        import leo.core.leoGlobals as g
    except ImportError:
        try:
            import leoGlobals as g
        except ImportError:
            << punt >>

Yes, this is ugly, but duplicating code from leoGlobals is not only
supremely ugly, it is also surprisingly dangerous.  It's all too easy
for me to think I am editing a leoGlobals function, when I am in fact
editing a *copy* in a file in leo/external.  I want to eliminate that
kind of mistake.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to