> >  Yes, that works. I don't understand why though - the current path - 
> > "." - is still Y, isn't it? How does that make it possible for A to 
> > find B? 
>
> I think the current directory is wherever A is, check 
>
> import os 
> g.es(os.getcwd()) 
>
> in A 
>
> But I think Python doesn't try to import from the current directory 
> unless you specifically tell it to, as above. 
>
>
A couple experiments helped me to understand. In fact, Leo *does* execute a 
script in the path designated by @path, but as you pointed out, the Python 
search path  does not include that path by default. However, this is 
different behavior from executing a script directly from a command prompt, 
in which case the default search path *does* include the current directory.

I would prefer not having to explicitly add the current path. Can this 
behavior be captured in Leo's code that executes the script?

Phil

-- 
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.

Reply via email to