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

Bill Janssen janssen at parc.com
Tue Feb 3 01:29:37 CET 2009


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

> Bill Janssen wrote:
> > Setting LSBackgroundOnly doesn't prevent that, it just sets the default.
> 
>  I don't understand -- what default? just the behavior when the app
> starts, but then it can still open windows, etc?

Chris, if you followed the thread, you'll know that what's happening is
that the Python.app app is being promoted to a "full app", without any
provision for behaving like a "full app".  In particular, it doesn't
participate in the various shutdown handshakes, and thus prevents logout
or shutdown.  This is pernicious.

What Ned and I are discussing is whether setting it to be, by default, a
different kind of app, would be a better idea.  It's not clear to me yet
whether LSBackgroundOnly or LSUIElement would be a better idea, but it
seems that one of them would be a good idea.

In either case, it can still open windows, etc.  Though if it were going
to do so, the Apple guidelines suggest it should call
TransformProcessType() before doing so.

> >> when people are
> >> testing an debugging GUI apps (TK, or wx, or....) they should be able
> >> to start a simple script at the command line without any restrictions.
> >
> > Sure, "open myapp.app". 
> 
> I meant without an app bundle -- just a raw python script.

Yes, I think that can be supported, too.

> > But if you follow the conversation a bit
> > further, I think we've found a place to enable that for _tkinter.
> 
> Does it require a change to _tkinter?

Don't know.  Let's see how Ned's patches work.

> If so, then all the GUI toolkits
> (OK, all three...) would have to be changed for this to work, which
> doesn't sound good.

But only tkinter is part of the Python distribution, I believe.  Of
course, whoever supports the various non-standard GUI toolkits might
also want to make changes, if necessary.  Of course, that's a pretty
standard thing that most third-party packages have to do when a new
version of Python is released, so I don't think it's a big deal.

Bill


More information about the Pythonmac-SIG mailing list