[Boa Constr] PYTHONSTARTUP
Status: Beta
Brought to you by:
riaan
From: Patrick K. O'B. <po...@or...> - 2001-06-08 18:03:59
|
Is there a way to have boa automatically execute the script pointed to by the PYTHONSTARTUP environment variable when boa starts? By way of example, the regular python shell started at the DOS prompt runs PYTHONSTARTUP automatically and IDLE does so if launched with the -s command line switch. One possible bit of code would look like this (taken from the python tutorial): import os filename = os.environ.get('PYTHONSTARTUP') if filename and os.path.isfile(filename): execfile(filename) --- Patrick K. O'Brien Orbtech "I am, therefore I think." |