Michael Yanowitz wrote:
> Is there something like a .pythoninitrc which can run whenever we start
> Python
> that can load a file with many sys.path.append(), etc?
>   If not is there some way to modify the Python shell constructor and
> destructor?
>
> Thanks in advance:
> Michael yanowitz

Yes, there is the user module:
http://docs.python.org/lib/module-user.html
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.
See:
http://docs.python.org/lib/module-site.html
for details.

Ziga

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to