[Pythonmac-SIG] py2app bug with argv_emulation=True

Ronald Oussoren ronaldoussoren at mac.com
Mon May 28 16:16:27 CEST 2012


On 26 May, 2012, at 17:10, Chris Barker wrote:

> On Fri, May 25, 2012 at 5:34 PM, Michael O'Donnell <micko at wagsoft.com> wrote:
>> He found that if you set argv_emulation to False, the program
>> worked as expected.
>> 
>> NOW, I need argv_emulation, since a user might open my application by
>> double clicking on a document associated with my program.  I don't want to
>> lose
>> this functionality (which users are used to by now) just because of a bug.
> 
> Perhaps argv emulation isn't the only way to support this. Does
> tkInter on the Mac Support the Mac-specific events? For example,
> wxPython has mac-specific events you can catch for files dropped on
> the app, or selected at startup -- so argv emulation isn't required.
> Maybe Tk doesn't have those, but it's worth a look.

+1 on this, it is better to use the Tkinter support for this instead of the argvemulation hack (which is mostly meant to be used with command-line scripts)

The source code for idle show how you can add support for the open-file event  to your application: <http://hg.python.org/cpython/file/cb716ee277cc/Lib/idlelib/macosxSupport.py#l54>

That said, I will try to fix the py2app bug when I have some time.

Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4788 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20120528/e54e0470/attachment.bin>


More information about the Pythonmac-SIG mailing list