[Idle-dev] Merging VIDLE differences into idlelib

Guilherme Polo ggpolo at gmail.com
Tue Aug 4 20:16:55 CEST 2009


2009/8/4 Ned Deily <nad at acm.org>:
> In article
> <ac2200130908040625qac2c52bg8946ae26e40e15ec at mail.gmail.com>,
>  Guilherme Polo <ggpolo at gmail.com> wrote:
>> I have verified the VIDLE fork last week expecting to find many
>> differences between it and IDLE. Most files differ but it turned out
>> that most of these differences are equivalent (many of the changes
>> were merged already), except for two of them. One of these changes is
>> related to py2app, so I can't verify it.
>
> [...]
>
>> Index: Lib/idlelib/macosxSupport.py
>> ===================================================================
>> --- Lib/idlelib/macosxSupport.py      (revision 74191)
>> +++ Lib/idlelib/macosxSupport.py      (working copy)
>> @@ -9,7 +9,7 @@
>>      """
>>      Returns True if Python is running from within an app on OSX.
>>      If so, assume that Python was built with Aqua Tcl/Tk rather than
>> -    X11 Tck/Tk.
>> +    X11 Tcl/Tk.
>>      """
>>      return (sys.platform == 'darwin' and '.app' in sys.executable)
>>
>> @@ -121,6 +121,13 @@
>>                          menu.add_command(label=label, underline=underline,
>>                          command=command, accelerator=accelerator)
>>
>> +def preprocessArguments():
>> +    # Deal with spurious argument passed by Finder, so "argv emulation" is
>> +    # not required for app bundle
>> +    argv = sys.argv
>> +    if runningAsOSXApp() and len(argv) > 1 and argv[1].startswith("-psn"):
>> +        del sys.argv[1]
>> +
>>  def setupApp(root, flist):
>>      """
>>      Perform setup for the OSX application bundle.
>
> This isn't needed as there already is similar code in
> Mac/IDLE/idlemain.py, an initialization script that gets invoked when
> IDLE.app is launched and that goes on to call idlelib.Pyshell.main.
> (BTW, this has nothing to do with py2app which is not used by IDLE or
> anything else in the standard library.)
>

I'm aware of py2app not being used by IDLE (or anything else in std
lib), but what prevents someone from running py2app on idlelib and
getting an similar IDLE.app ? I'm really not into Mac, but isn't this
IDLE.app just an bundle that could be similarly built with py2app ?

Anyway, if the code for supporting argv emulation already exists then
it is very fine to not include it.

Thanks for your input,

> --
>  Ned Deily,
>  nad at acm.org
>



-- 
-- Guilherme H. Polo Goncalves


More information about the IDLE-dev mailing list