On Wed, May 25, 2016 at 6:27 PM, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > I don't think this is that much different from the way other scripting > languages handle it. E.g. bash. If I have a set of (say) shell scripts: > > fnord/ > +-- foo.sh > +-- bar.sh > > > where foo.sh runs bar.sh, but fnord is *not* on the PATH, the way you make it > work is: > > - have foo.sh temporarily modify the PATH; > - have foo.sh call bar.sh using an absolute pathname. > > That second option isn't available to Python, but then, .pth files aren't > available to the shell :-)
The one obvious way with shell scripts is a *relative* pathname. You can say "./bar.sh" (or, if you want to run something relative to the script directory, some manipulation of path names and $0 will do that for you). The best Python equivalent would be: from . import bar I'd very much like for that to be possible. ChrisA -- https://mail.python.org/mailman/listinfo/python-list