Initial value of sys.path

Paul Moore paul.moore at uk.origin-it.com
Mon Oct 30 08:17:34 EST 2000


On Mon, 30 Oct 2000 12:59:43 +0100, Simon Brunning
<SBrunning at trisystems.co.uk> wrote:

>> From:	Mark Hammond [SMTP:MarkH at ActiveState.com]
>> Paul Moore wrote:
>> > The initial value for sys.path on WIndows is signiicantly different
>> > from that on Unix. Specifically, there is no site-packages directory
>> > on Windows.
>> 
>> I believe the deliberate decision was simply to "leave windows alone". 
>> It wasn't clear at the time how useful the site packages would truly 
>> turn out to be, and Windows already had special registry support.
> 
>I'd be very interested to know why this is. I have set up a site directory
>under my Python directory, added to my Python path, and put all my
>additional modules and packages there. It works fine, and makes the whole
>set-up *much* neater.

Depends how you do it. I put a "site" directory in my PYTHONPATH by
adding it to the registry. But if I put a .pth file in there, site.py
doesn't seem to pick it up. Probably something to do with order of
initialisation, or some such.

And of course, distutils ignores a site entry you have put in for
yourself (unless you add a parameter telling it otherwise).

Paul.




More information about the Python-list mailing list