[Pythonmac-SIG] IDLE etc build from CVS

Tony Lownds tony@lownds.com
Wed, 19 Feb 2003 10:19:24 -0800


Cool, works great. I have updated the IDLE bug/patch (IDLE still 
won't work as built from CVS) http://python.org/sf/688266

A small issue:

The __argvemulator_<mainfile>.py is leaving modules in the __main__ namespace.
These are visible to IDLE users if they type dir()

Instead of:

import argvemulator, os

argvemulator.ArgvCollector().mainloop()
execfile(os.path.join(os.path.split(__file__)[0], "macosx_main.py"))

How about:

__import__('argvemulator').ArgvCollector().mainloop()
execfile(
    (lambda os=__import__('os'):
        os.path.join(os.path.dirname(__file__), "macosx_main.py")
    )()
)

Its ugly but keeps __main__ clean.

-Tony

At 12:50 PM +0100 2/19/03, Jack Jansen wrote:
>Building applets has been fixed in CVS, and so has argvemulator. I 
>haven't looked at the startup time yet, that'll
>have to wait until after 2.3a2.
>
>These long startup times are something that's only started to bother 
>me recently. If you run things with "pythonw -v"
>it seems that it's always the import of the first Carbon module that 
>causes the delay. I'm not sure why it suddenly appeared, or at least 
>suddenly became more noticeable.
>--
>Jack Jansen, <Jack.Jansen@cwi.nl>, http://www.cwi.nl/~jack
>If I can't dance I don't want to be part of your revolution -- Emma Goldman
>
>
>_______________________________________________
>Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
>http://mail.python.org/mailman/listinfo/pythonmac-sig