summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/PyShell.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2003-08-14 14:54:28 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2003-08-14 14:54:28 (GMT)
commitb785518d051dab322feafaed0fc79d7218ce6cb0 (patch)
treea75fe228986ace4b865f19cd0f44df41eb19c85e /Lib/idlelib/PyShell.py
parent8fd8def1fae956f5fa62798012d84fe88c83c800 (diff)
downloadcpython-b785518d051dab322feafaed0fc79d7218ce6cb0.zip
cpython-b785518d051dab322feafaed0fc79d7218ce6cb0.tar.gz
cpython-b785518d051dab322feafaed0fc79d7218ce6cb0.tar.bz2
IDLE didn't start correctly when Python was installed in "Program Files"
on W2K and XP. Python Bugs 780451, 784183 Backported to 2.2-maint
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r--Lib/idlelib/PyShell.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 388c384..81ef88e 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -318,7 +318,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
def spawn_subprocess(self):
args = self.subprocess_arglist
- self.rpcpid = os.spawnv(os.P_NOWAIT, args[0], args)
+ self.rpcpid = os.spawnv(os.P_NOWAIT, sys.executable, args)
def build_subprocess_arglist(self):
w = ['-W' + s for s in sys.warnoptions]
@@ -331,7 +331,12 @@ class ModifiedInterpreter(InteractiveInterpreter):
command = "__import__('idlelib.run').run.main(" + `del_exitf` +")"
else:
command = "__import__('run').main(" + `del_exitf` + ")"
- return [sys.executable] + w + ["-c", command, str(self.port)]
+ if sys.platform[:3] == 'win' and ' ' in sys.executable:
+ # handle embedded space in path by quoting the argument
+ decorated_exec = '"%s"' % sys.executable
+ else:
+ decorated_exec = sys.executable
+ return [decorated_exec] + w + ["-c", command, str(self.port)]
def start_subprocess(self):
addr = (LOCALHOST, self.port)