automatically import modules upon interpreter invocation

Jeffrey Froman jeffrey at
Thu Jun 26 17:42:46 CEST 2008

Daniel Fetchinson wrote:

> Is there a way of making python execute the above whenever it starts
> up so that I don't have to type it all the time?

Create a script containing these statements, and specify its location with
the PYTHONSTARTUP environment variable. Your script will run whenever
python starts.


More information about the Python-list mailing list