automatically import modules upon interpreter invocation

Jeffrey Froman jeffrey at fro.man
Thu Jun 26 11:42:46 EDT 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.


Jeffrey



More information about the Python-list mailing list