Understanding .pth in site-packages

Josh English Joshua.R.English at gmail.com
Sat Aug 27 18:56:40 CEST 2011


(This may be a shortened double post)

I have a development version of a library in c:\dev\XmlDB\xmldb

After testing the setup script I also have c:\python27\lib\site-packages\xmldb

Now I'm continuing to develop it and simultaneously building an application with it.

I thought I could plug into my site-packages directory a file called xmldb.pth with:

c:\dev\XmlDB\xmldb

which should redirect import statements to the development version of the library.

This doesn't seem to work.

Is there a better way to redirect import statements without messing with the system path or the PYTHONPATH variable?

Josh



More information about the Python-list mailing list