how to change sys.path?
ziga.seilnacht at gmail.com
Thu May 25 15:29:33 CEST 2006
Michael Yanowitz wrote:
> Is there something like a .pythoninitrc which can run whenever we start
> that can load a file with many sys.path.append(), etc?
> If not is there some way to modify the Python shell constructor and
> Thanks in advance:
> Michael yanowitz
Yes, there is the user module:
which you have to explicitly import and which will look for
.pythonrc.py file in user's home directory and execute it.
The other option is a sitecustomize module, which should
be put somewhere on the initial search path. It will be
imported automatically during the interpreter initialization.
More information about the Python-list