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

Ronald Oussoren ronaldoussoren at mac.com
Wed Feb 4 07:49:56 CET 2009


On 3 Feb, 2009, at 17:49, Bill Janssen wrote:

> Ronald Oussoren <ronaldoussoren at mac.com> wrote:
>
>> if I understand the
>> LSUIElement document correctly the setting you propose would make it
>> impossible to use "python sometkscript.py" to run a simple GUI  
>> script.
>
> Then you misunderstand either LSUIElement, or the discussion so far.
> What we'd like to do is to retain that capability.

I've tested the LSUIElement key with a GUI script, and based on that  
I'm opposed to including that key in Python.app. You can always wrap  
your scripts in an app bundle that does have the key set, or  
investigate how to avoid getting the rocket icon in the dock when you  
use appscript, as Has suggested.

LSUIElement=1 completely surpresses the dock icon and menu bar for an  
application, although you can get those back by calling an API. This  
would be a support nightmare for python.app, any (OSX) newby that runs  
a Tkinter script from a tutorial ends up with a non-functional  
application.  Furthermore cross-platform scripts would have to call  
the "upgrade-API" to ensure they have a menu, making OSX different  
from Linux and Windows.

Both could be worked around by including a call to the "upgrade-API"  
in the startup code for GUI toolkits (Tkinter, WxWidget, QT, ...), but  
that would mean you can no longer create agent applications using  
those toolkits. An agent application is supposed to be a mostly  
faceless background application that can pop-up a window when it needs  
to. I guess Growl would be a good example of such functionality,  
although I haven't checked if they use the LSUIElement key.

Ronald

>
>
> Please read the Apple document I referenced earlier to get an idea of
> what the three different classes of application are.  In any case, you
> can always "promote" an app to a heavier-weight presence; what Apple
> doesn't give us an interface for is to "demote" the app if it's been
> promoted by accident.
>
> Bill

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


More information about the Pythonmac-SIG mailing list