allow scripts to use .pth files?

Alan Isaac aisaac at
Tue Jul 3 16:35:50 CEST 2007

Suppose I have a directory `scripts`.
I'd like the scripts to have access to a package
that is not "installed", i.e., it is not on sys.path.
On this list, various people have described a variety
of tricks they use, but nobody has proposed a 
pretty way to allow this.
I am therefore assuming there is not one. (?)

How about allowing a `scripts.pth` file in such a `scripts`
directory, to work like a path configuration file?
(But to be used only when __name__=="__main__".)

Alan Isaac

More information about the Python-list mailing list