[pywin32-checkins] /hgrepo/p/py/pywin32/pywin32: Create __file__ while script is ru...
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <pyw...@li...> - 2011-06-03 00:13:10
|
changeset 504901631d56 in /hgrepo/p/py/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgrepo/p/py/pywin32/pywin32?cmd=changeset;node=504901631d56 summary: Create __file__ while script is running as python.exe does diffstat: Pythonwin/pywin/framework/scriptutils.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diffs (19 lines): diff -r aced4aa3ebde -r 504901631d56 Pythonwin/pywin/framework/scriptutils.py --- a/Pythonwin/pywin/framework/scriptutils.py Mon May 30 17:05:44 2011 -0400 +++ b/Pythonwin/pywin/framework/scriptutils.py Tue May 31 23:20:39 2011 -0400 @@ -315,6 +315,7 @@ _HandlePythonFailure("run script", script) # No code object which to run/debug. return + __main__.__file__=script try: if debuggingType == RS_DEBUGGER_STEP: debugger.run(codeObject, __main__.__dict__, start_stepping=1) @@ -349,6 +350,7 @@ interact.edit.currentView.AppendToPrompt([]) if debuggingType == RS_DEBUGGER_PM: debugger.pm() + del __main__.__file__ sys.argv = oldArgv if insertedPath0: del sys.path[0] |