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

Ned Deily nad at acm.org
Mon Feb 2 22:05:15 CET 2009


In article <73365.1233593908 at parc.com>, Bill Janssen <janssen at parc.com> 
wrote:

> I'm thinking that the right thing to do about rocket-in-the-dock should
> be to change the Info.plist of Python.app, to include the setting
> "LSUIElement: 1".

There's also LSBackgroundOnly.  That might be even more appropriate.  
But OTOH ...

> It seems to me that this is what we want for the Python interpreter
> proper.  Applications (like IDLE) that are indeed proper foreground apps
> can always call TransformProcessType() to override this setting and get
> a dock icon for themselves.

... setting it does have the side effect of making IDLE's menus 
disappear when launched from the command line (bin/idle).  (Launching 
via IDLE.app is unaffected.)  It also has the effect of removing the 
default Tcl/Tk-supplied menu bar for Tkinter programs; try running the 
turtleDemo, for instance.  Those programs lose Copy/Paste/Cut and the 
Quit, though the app does quit if you click the red window close button.  
Perhaps tkinter can call TPT.

I'm poking in that area at the moment and will be submitting a number of 
patches for 3.x and 2.x real soon now.  I'll try to whip something up in 
the next few days and report back.

One thing the background settings doesn't seem to change is the 
regression test (subprocess) that brings up the Application Failed 
dialog.  But I haven't had time to look at that one in detail yet.

Have you tried this with appscript?

-- 
 Ned Deily,
 nad at acm.org



More information about the Pythonmac-SIG mailing list