Mercurial > cpython-lru_cache-weakref
diff Lib/idlelib/PyShell.py @ 29101:32e70ad79f66 legacy-trunk
1. The command-line arguments for subprocesses no longer need to be
specialized for Mac OS X.
2. buildapp.py - a new file for building an application icon for IDLE on Mac
OS X. See INSTALL.txt
| author | Tony Lownds <tony@lownds.com> |
|---|---|
| date | Tue, 13 May 2003 15:28:21 +0000 |
| parents | ad84fe58ec2f |
| children | 7875fcaae7a3 |
line wrap: on
line diff
--- a/Lib/idlelib/PyShell.py Tue May 13 15:02:06 2003 +0000 +++ b/Lib/idlelib/PyShell.py Tue May 13 15:28:21 2003 +0000 @@ -311,29 +311,15 @@ self.rpcpid = os.spawnv(os.P_NOWAIT, args[0], args) def build_subprocess_arglist(self): - if sys.platform == 'darwin' and sys.argv[0].count('.app'): - # We need to avoid using sys.executable because it fails on some - # of the applet architectures On Mac OS X. - # - # here are the applet architectures tried: - # - # framework applet: sys.executable + -p is correct - # python 2.2 + pure python main applet: - # sys.executable + -p is correct - # pythonw idle.py: sys.executable + -c is correct - # - # XXX what about warnoptions? - return [sys.executable, '-p', str(self.port)] + w = ['-W' + s for s in sys.warnoptions] + # Maybe IDLE is installed and is being accessed via sys.path, + # or maybe it's not installed and the idle.py script is being + # run from the IDLE source directory. + if __name__ == 'idlelib.PyShell': + command = "__import__('idlelib.run').run.main()" else: - w = ['-W' + s for s in sys.warnoptions] - # Maybe IDLE is installed and is being accessed via sys.path, - # or maybe it's not installed and the idle.py script is being - # run from the IDLE source directory. - if __name__ == 'idlelib.PyShell': - command = "__import__('idlelib.run').run.main()" - else: - command = "__import__('run').main()" - return [sys.executable] + w + ["-c", command, str(self.port)] + command = "__import__('run').main()" + return [sys.executable] + w + ["-c", command, str(self.port)] def start_subprocess(self): addr = ("localhost", self.port)
