[Pythonmac-SIG] appscript Python script preventing logout

Bill Janssen janssen at parc.com
Wed Dec 17 04:36:58 CET 2008


I'm having a bit of a problem with a Python script I'm running.  It sits
in a loop and periodically asks "System Events" what's going on, via
appscript.  The use of appscript turns it into a "foreground process",
in the terminology used in
http://developer.apple.com/DOCUMENTATION/MacOSX/Conceptual/BPSystemStartup/Articles/BootProcess.html.

This means that when I try to logout, or reboot, the loginwindow sends
it a kAEQuitApplication event, but it never replies, which means that
after 45 seconds loginwindow automatically aborts the logout or
shutdown.  So, I either need to take that darn rocket out of the Dock
(which I'd like to be able to do), or somehow catch and handle
kAEQuitApplication events.

Any advice?

Bill


More information about the Pythonmac-SIG mailing list