[Pythonmac-SIG] appscript rocket-in-dock preventing logout

has hengist.podd at virgin.net
Sat Jan 31 22:55:52 CET 2009


On 31 Jan 2009, at 20:18, Bill Janssen wrote:

> has <hengist.podd at virgin.net> wrote:
>> ...or prevent the OS from automatically upgrading your
>> python process to a GUI process (which it only does if it knows the
>> executable is located in an application bundle, e.g. Python.app/
>> Contents/MacOS/python).
>
> Thanks!
>
> I'm not running Python.app -- I'm running /usr/bin/python, which if I
> follow the symlinks leads me to
> /System/Library/Frameworks/Python.framework/Versions/2.5/bin/ 
> python2.5,

That's just a stub that kicks off the real executable at:

/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/ 
Python.app/Contents/MacOS/Python


> Perhaps it's not the OS "upgrading" the process, but rather some  
> code in
> some extension calling "TransformProcessType"

It's the Carbon Process Manager. (There's no good reason for it to do  
so, but hey, I didn't write the thing.)


> And I still don't see how to fix the logout/shutdown problem.  The  
> Apple
> Cocoa document on this,
> http://developer.apple.com/documentation/Cocoa/Conceptual/AppArchitecture/Tasks/GracefulAppTermination.html 
> ,
> seems to say "In Cocoa, all raw events requiring application  
> termination
> result in the invocation of the NSApplication delegation method
> applicationShouldTerminate:. If the delegate does not implement this
> method, the application is terminated regardless of any unsaved
> documents."

Right now this is irrelevant as your process doesn't have an event loop.

Regards,

has
-- 
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net



More information about the Pythonmac-SIG mailing list