[Tutor] Adding a search path PERMANENTLY?

Hee-Seng Kye kyeser at earthlink.net
Sat Jul 10 18:37:21 CEST 2004

Could anyone tell me how to set a Python search path PERMANENTLY?  If I 

 >>> import sys
 >>> sys.path.append('/users/kyeser/python/module')

It's only valid while the interpreter is active and goes away when I 
restart the interpreter.  Every manual I've read said something about 
setting PYTHONPATH, but I'm not sure how.

I'm also curious how to set PYTHONSTARTUP.  I've tried creating 
'.pythonrc.py' at my home directory, but it didn't do anything.  If I 
wanted to do something like:

 >>> import sys
 >>> sys.ps1 = '--> '

How would I make this permanent?

Many thanks,


More information about the Tutor mailing list