
Would someone help me have a shrink-wrapped solution for obtaining libvirt events in python? I'm looking for a python module with no API calls (or maybe just a few). I'd like to register a callback functions with virConnect.domainEventRegister(), and want them to be called in the context of a specialized (automatically-created?) thread. I don't mind if the module has two API calls instead: register() and startPollThread(). I learned that it takes me far too long to do it on my own, and that just modifying events-python.py (attached) reaches miserable outcomes ("libvir: Domain error : invalid domain pointer in virDomainFree", and deadlocked python: #0 0x00000037fe40d174 in __lll_lock_wait () from /lib64/libpthread.so.0 #1 0x00000037fe408aca in _L_lock_1034 () from /lib64/libpthread.so.0 #2 0x00000037fe40898c in pthread_mutex_lock () from /lib64/libpthread.so.0 #3 0x0000003cce04db84 in remoteDomainEventFired () #4 0x00002b4cc96e1612 in libvirt_virEventInvokeHandleCallback () ) Help most welcome, Dan.