[Tutor] How to set PYTHONPATH variable at Python startup

Alok Rai alok_rai at persistent.co.in
Sat Sep 20 04:03:14 EDT 2003


Hi,
        I might sound pretty naive to ask this question which must have been asked here umpteen times, but since I am fairly new to this community I think I can get away with this :-). None of the previous replies posted on similar topics have been of any help to me.
        My question is there a way by which my current working directory would automatically get added to Python path along with all its sub-directories (on both Windows and Linux platforms). I am aware of how one can set the PYTHONPATH variable but I wish to know how one can automatically configure Python to set this path on starting up. I would also like to know about something called PYTHONSTARTUP which tells Python what commands to run before starting the interpreter. Currently in Windows I edit a registry entry called Python Path to set PYTHONPATH variable. But I wish to know how this can be done automatically (or through the PYTHONSTARTUP option).

Regards,
Alok.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20030920/8400b423/attachment.html


More information about the Tutor mailing list