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
This commit is contained in:
Tony Lownds 2003-05-13 15:28:21 +00:00
parent e9a54a3eaf
commit 2398d578a3
4 changed files with 35 additions and 64 deletions

View file

@ -311,29 +311,15 @@ class ModifiedInterpreter(InteractiveInterpreter):
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)