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

Bill Janssen janssen at parc.com
Tue Feb 3 19:14:23 CET 2009


Christopher Barker <Chris.Barker at noaa.gov> wrote:

> This is a concern -- what if I do need to "Force Quit" my app? I can
> probably find it with ps, and kill it with kill, but that's only
> because I was a Linux geek before I got a Mac.

Then give your app its own Info.plist.  There are zillions of processes
running on your Mac that don't appear in the "Force Quit" window --
that's what Activity Monitor is for.

> Also, if you do want an icon in the dock -- even the default rocket -- 
> you would need to do something special to get it, no?

Yes -- use a different Info.plist.

> Though: I've tried changing my info.plist and haven't seen any change
> at all -- how do I know if I did it right?

I'm tempted to say: if you don't know whether or not you've done it
right, don't try doing it at all.

But in the spirit of education, here's what I've got in my Python.app's
Info.plist:

	<key>LSUIElement</key>
	<true/>

> > The key is that you can always make the process more "heavyweight", but
> > you can't go in the other direction.  So Python should start as low as
> > possible, and work up as necessary
> 
> Which does make sense.

Thanks!

> As there are really only a few GUI toolkits:
> 
> wxPython
> TkInter
> pyObjC
> pyQT
> 
> It may be fine to have the GUI code promote the app, but we do need to
> get those devs on board (as Robin apparently already is).

Sure.  TkInter is part of Python, so any patch should cover that as
well.  PyObjC programs can make the call directly, if they wish to, but
most PyObjC programs with windows are probably full-fledged apps,
anyway.  Don't know much about pyQt, or pyGTK.

I also don't think the GUI toolkit should promote willy-nilly -- it
should probably provide a call which the user program can make to
promote.

> And another option is the "pythonb" option for background apps,
> analogous to the old pythonw

Or PythonBackground.app, which would also be a way to slice this.

Bill


More information about the Pythonmac-SIG mailing list