Initial value of sys.path

Paul Moore gustav at morpheus.demon.co.uk
Sun Oct 29 17:09:39 EST 2000


The initial value for sys.path on WIndows is signiicantly different
from that on Unix. Specifically, there is no site-packages directory
on Windows.

This is clearly a deliberate decision (as far as I can see, it's
enshrined in site.py, where it depends on os.sep being '/', and in
distutils/command/install.py, where it is in the INSTALL_SCHEMES
dictionary.

What I don't understand is WHY it was made. OK, a proportion of
Windows applications do things like this (mix distributed code and
site-specific details), but I don't think it is particularly common,
and it certainly isn't good practice, IMHO. Surely, the argument for
separating the "core" disrtibution from site-specific packages is just
as valid on Windows as on Unix?

I guess the only person who can say for sure is Guido, but can anybody
explain why things are set up this way - or point me to somewhere
where the rationale is documented?

Thanks,
Paul Moore.

PS And if anyone can suggest how I could modify this policy - short of
hacking site.py and the distutils - I would be modt grateful...



More information about the Python-list mailing list