[pywin32-checkins] pywin32/Pythonwin/pywin/framework interact.py, 1.23, 1.24
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2010-08-26 02:00:24
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24148/pythonwin/pywin/framework Modified Files: interact.py Log Message: Pythonwin: PYTHONSTARTUP is honoured, just like when using python.exe (kxroberto) Index: interact.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/interact.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** interact.py 10 Jul 2009 05:30:00 -0000 1.23 --- interact.py 26 Aug 2010 02:00:16 -0000 1.24 *************** *** 289,292 **** --- 289,300 ---- else: sys.stderr.write(banner) + rcfile = os.environ.get('PYTHONSTARTUP') + if rcfile: + import __main__ + try: + execfile(rcfile, __main__.__dict__, __main__.__dict__) + except: + sys.stderr.write(">>> \nError executing PYTHONSTARTUP script %r\n" % (rcfile)) + traceback.print_exc(file=sys.stderr) self.AppendToPrompt([]) |