Ensure sys.argv[0] is the script name on Run Script.
This commit is contained in:
parent
96cf271be9
commit
ee03611a8d
|
@ -73,6 +73,9 @@ class ScriptBinding:
|
||||||
flist = self.editwin.flist
|
flist = self.editwin.flist
|
||||||
shell = flist.open_shell()
|
shell = flist.open_shell()
|
||||||
interp = shell.interp
|
interp = shell.interp
|
||||||
|
if (not sys.argv or
|
||||||
|
os.path.basename(sys.argv[0]) != os.path.basename(filename)):
|
||||||
|
sys.argv = [filename]
|
||||||
interp.execfile(filename)
|
interp.execfile(filename)
|
||||||
|
|
||||||
def getfilename(self):
|
def getfilename(self):
|
||||||
|
|
Loading…
Reference in New Issue