Personal tools
You are here: Home CDAT Tips and Tricks Python Tips Loading module or commands at startup.
Document Actions

Loading module or commands at startup.

by Renata McCoy last modified 2007-05-08 10:50

Goal: Learn how to load a module or execute commands at startup.

 
    • Set environement variable “PYTHONSTARTUP” to a file.
    • Put import statements in that file to import a module or commands to be executed at startup.
    • Warning: it does not work with python –i script.py.
 

Powered by Plone