[vbox-dev] How to create an object implementing VirtualBoxCallback from python?
narf at mundo-r.com
Sun Jun 14 09:15:52 PDT 2009
Ok, I've discovered how I can do it. I had to create a class
implementing all the callback functions in the VirtualBoxCallback
interface and define a class attribute:
_com_interfaces_ = xpcom.components.interfaces.IVirtualBoxCallback
Now the problem is the callback functions are executed only when I
call a virtualbox function from my program, and not when the event is
produced. Is there any function I can call that puts my program to
sleep until there is a virtualbox event? Similar to the gtk.main()
loop, for example.
On Sat, Jun 13, 2009 at 10:56 PM, Narf<narf at mundo-r.com> wrote:
> I'm finishing the migration of my program from ugly hacks to the
> python api provided by virtualbox. The only thing left is being able
> to register callbacks. I assume I have to create an object
> implementing the VirtualBoxCallback interface, assign a function to
> the onMachineStateChange (or wathever event I want to monitor)
> variable and pass that object to registerCallback. Is this possible to
> do this in python? If so, how can it be done?
More information about the vbox-dev