[Pythonmac-SIG] InstallApplicationEventHandler and/or InstallEventHandler
don bright
phdecora at yahoo.com
Tue May 16 03:41:42 CEST 2006
Dear Pythonians,
I'm trying to detect when a process starts/stops. I'm
contemplating this excellent example from Apple,
'observing process lifetimes without polling'
http://developer.apple.com/technotes/tn/tn2050.html
However, it uses a function called
InstallApplicationEventHandler. I guess this is from
Carbon? The closest thing I can find in the python
source code is some files in _CarbonEvtModule.c:
http://pxr.openlook.org/pxr/source/Mac/Modules/carbonevt/_CarbonEvtmodule.c
However, I can't seem to figure out how or if I can
use it.
>>> import Carbon
>>> import Carbon.CarbonEvt
>>> Carbon.CarbonEvt.InstallEventHandler
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute
'InstallEventHandler'
---
If this can't work I will try kvm_open() and
kvm_getprocs(), but I can't seem to figure out how to
make those work from python either. I tried to use
ctypes to open the dynamic c library but when I called
kvm_open() it always returns '0' instead of a pointer
like it should.
----
I guess I could try writing an extension but I'd
rather not. Any help is appreciated. Thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Pythonmac-SIG
mailing list