Commit ee03611a authored by Guido van Rossum's avatar Guido van Rossum

Ensure sys.argv[0] is the script name on Run Script.

parent 96cf271b
......@@ -73,6 +73,9 @@ class ScriptBinding:
flist = self.editwin.flist
shell = flist.open_shell()
interp = shell.interp
if (not sys.argv or
os.path.basename(sys.argv[0]) != os.path.basename(filename)):
sys.argv = [filename]
interp.execfile(filename)
def getfilename(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment