site.py on Windows

Don Dwiggins dwig at advancedmp.net
Fri Mar 16 18:29:56 CET 2001


Chris Gonnerman writes in response to my efforts to make use of site.py:
> Frankly, I just hack site.py like so:

> # site.py, Python 2.0, about line 259
> addsitedir("c:/python/lib/site-packages")

> It may not be the right way to do it, but it works for me.  Don't
> forget to substitute your Python install directory.

Thanks for that.  Digging a little deeper, I was able to avoid modifying
site.py.  It turns out that you can put .pth files in the install directory
itself (c:/python in your case) rather than in the site-packages directory,
and they'll be recognized.  Not as clean as the documentation describes, but
it does get the job done.

Finally, can anyone in the "core" team enlighten us as to why site.py treats
Unix differently from other OS's?  As I mentioned before, I'd be willing to
work on making this more uniform (at least for Windows -- I don't have
access to a Mac) if I knew what the issues are.

-- 
Don Dwiggins                    "Solvitur Ambulando"
Advanced MP Technology
dwig at advancedmp.net





More information about the Python-list mailing list