[Pythonmac-SIG] Should Python.app be an LSUIElement = 1 app?

Bill Janssen janssen at parc.com
Tue Feb 3 19:00:49 CET 2009


Chris, I'm a bit confused, too.

> Could someone (Bill?) summarize what functionally will change if this
> change is applied?

Basically, if you're running /usr/bin/python or Python.app directly, you
still won't get a dock icon even if you're using appscript.  The app is
marked as an agent application -- still trying to figure out just what
that means.

> Some python scripts that are GUI-free are calling some Carbon APIs
> that cause the system to promote them to full-GUI mode, and that then
> breaks things:
>  - you get a icon in the doc, which you don't want
>  - they are not shut down by the system when logging off/shutting
> down, 'cause they don't respond to the appropriate calls.

Yep, that's what seems to be happening.

> By the way, that later issues confuses the heck out of me -- why the
> heck would anyone write a system shut down procedure that couldn't
> override a non-responsive application? -- weird. (of course, Windows
> does it too...)

Excellent point.  I think what happens is that the system thinks Python
should be responding to it, and when it doesn't (because it's been
improperly promoted), it feels it might have timed out, and to avoid
losing your data, cancels the logout.  I assume there's some magic key
combo you could press while logging out to override that protection; I
just don't know what it is.

Bill


More information about the Pythonmac-SIG mailing list