Mercurial > cpython-lru_cache-weakref
diff Lib/idlelib/PyShell.py @ 30143:f4b4bf7e87d7 2.3
- IDLE didn't start correctly when Python was installed in "Program Files"
on W2K and XP. Python Bugs 780451, 784183
| author | Kurt B. Kaiser <kbk@shore.net> |
|---|---|
| date | Thu, 14 Aug 2003 15:15:02 +0000 |
| parents | 52dd548d3be9 |
| children | 4c06f4faed87 |
line wrap: on
line diff
--- a/Lib/idlelib/PyShell.py Tue Aug 12 17:38:22 2003 +0000 +++ b/Lib/idlelib/PyShell.py Thu Aug 14 15:15:02 2003 +0000 @@ -318,7 +318,7 @@ 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 @@ 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 == 'win32' 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)
