use Popen instead of os.spawnle
This commit is contained in:
parent
a6f9a2be12
commit
0781f9392b
@ -360,15 +360,7 @@ class ExampleLoader(QtGui.QMainWindow):
|
|||||||
fn = self.currentFile()
|
fn = self.currentFile()
|
||||||
if fn is None:
|
if fn is None:
|
||||||
return
|
return
|
||||||
if sys.platform.startswith('win'):
|
subprocess.Popen([sys.executable, fn], env=env)
|
||||||
args = [os.P_NOWAIT, sys.executable, '"'+sys.executable+'"', '"' + fn + '"']
|
|
||||||
else:
|
|
||||||
args = [os.P_NOWAIT, sys.executable, sys.executable, fn]
|
|
||||||
if env is None:
|
|
||||||
os.spawnl(*args)
|
|
||||||
else:
|
|
||||||
args.append(env)
|
|
||||||
os.spawnle(*args)
|
|
||||||
|
|
||||||
def showFile(self):
|
def showFile(self):
|
||||||
fn = self.currentFile()
|
fn = self.currentFile()
|
||||||
|
Loading…
Reference in New Issue
Block a user