@@ -311,29 +311,15 @@ def spawn_subprocess(self):
311311 self .rpcpid = os .spawnv (os .P_NOWAIT , args [0 ], args )
312312
313313 def build_subprocess_arglist (self ):
314- if sys .platform == 'darwin' and sys .argv [0 ].count ('.app' ):
315- # We need to avoid using sys.executable because it fails on some
316- # of the applet architectures On Mac OS X.
317- #
318- # here are the applet architectures tried:
319- #
320- # framework applet: sys.executable + -p is correct
321- # python 2.2 + pure python main applet:
322- # sys.executable + -p is correct
323- # pythonw idle.py: sys.executable + -c is correct
324- #
325- # XXX what about warnoptions?
326- return [sys .executable , '-p' , str (self .port )]
314+ w = ['-W' + s for s in sys .warnoptions ]
315+ # Maybe IDLE is installed and is being accessed via sys.path,
316+ # or maybe it's not installed and the idle.py script is being
317+ # run from the IDLE source directory.
318+ if __name__ == 'idlelib.PyShell' :
319+ command = "__import__('idlelib.run').run.main()"
327320 else :
328- w = ['-W' + s for s in sys .warnoptions ]
329- # Maybe IDLE is installed and is being accessed via sys.path,
330- # or maybe it's not installed and the idle.py script is being
331- # run from the IDLE source directory.
332- if __name__ == 'idlelib.PyShell' :
333- command = "__import__('idlelib.run').run.main()"
334- else :
335- command = "__import__('run').main()"
336- return [sys .executable ] + w + ["-c" , command , str (self .port )]
321+ command = "__import__('run').main()"
322+ return [sys .executable ] + w + ["-c" , command , str (self .port )]
337323
338324 def start_subprocess (self ):
339325 addr = ("localhost" , self .port )
0 commit comments