RE: [Boa Constr] PYTHONSTARTUP
Status: Beta
Brought to you by:
riaan
From: Patrick K. O'B. <po...@or...> - 2001-06-08 18:39:49
|
Might be better to do something like: import os filename = os.environ.get('PYTHONSTARTUP') try: execfile(filename) except: print "Unable to load startup script", filename del os # Unless you want to leave os in the namespace. --- Patrick K. O'Brien Orbtech "I am, therefore I think." -----Original Message----- From: boa...@li... [mailto:boa...@li...]On Behalf Of Patrick K. O'Brien Sent: Friday, June 08, 2001 1:05 PM To: Boa Constructor Users Subject: [Boa Constr] PYTHONSTARTUP 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." _______________________________________________ Boa-constructor-users mailing list Boa...@li... http://lists.sourceforge.net/lists/listinfo/boa-constructor-users |