python wia and RegisterEvent
Roger Upole
rupole at hotmail.com
Sun Apr 18 21:22:03 EDT 2010
gelonida wrote:
...
> while True:
> print "sleep"
> time.sleep(10)
>
>When I plug / unplug a USB WIA device nothing shows up.
> My C# implementation prints messages on wiaEventDeviceConnected /
> wiaEventDeviceDisconnected events if I register them.
>
> What am I missing?
You need to be processing messages to receive COM events.
Try replacing your sleep loop with pythoncom.PumpMessages().
Roger
More information about the Python-list
mailing list