win32 python path

John J. Lee phrxy at
Sat Feb 10 06:20:19 CET 2001

I'm not sure if this is the same on unix as I'm not near a suitable
machine ATM, but I get this behaviour on win95:


Where xxxx.pth points to the directory xxxx, of course.  Python doesn't
see with this set-up, but it does if you have instead:


which is fine if you only have one locally-installed module, but annoying
if you have lots.  Why does Python (2.0) do this?  I am aware of the fact
that Guido is in favour (who knows why) of dumping all locally-installed
modules in Lib on windows.

I also don't like the way that .pth files are frowned upon.  For example,
tiny module 'TableIO' has a .so / .DLL _tableio.pyd and a pure python
module  It would be nice to have them both in one directory,
because otherwise files like this will end up scattered over your module
directory and you won't know which ones belong together.  In this case I
suppose you could just make a directory TableIO and import with

from TableIO import TableIO

but many modules have a class with the same name as the module, so you'd
end up with

from TableIO import TableIO.TableIO

which is silly.

Thanks for any help


"Deprecating .pth's is silly, and does not at at all good things."

More information about the Python-list mailing list