[Pythonmac-SIG] comp.lang.python ?: startup script

Just van Rossum just@letterror.com
Fri, 7 Mar 2003 21:09:29 +0100


JR wrote:

> While we use various forms of Python.  On Mac OS we currently are
> required to leverage MacPython (for CFM vs. MachO reasons).  How does
> one make MacPython respond to the various PYTHON env variables?
> 
> Does PYTHONSTARTUP exec after all "normal" interpreter intialization
> completes?

I don't think you can. But there's sitecustomize.py: create one, place
it somewhere along sys.path, it will be imported by site.py.

Just