Re: [Pyusb-users] PyUSB 2.6

2009-01-04 Thread Wander Lairson
detachKernelDriver will fail if you have no enough permissions, won't it? 2009/1/2 Jim Easterbrook : > Karl Ostmo wrote: >> I use this approach in my code: >> >> try: >> self.handle.claimInterface( 0 ) >> except usb.USBError, e: >> if e.message.find("could n

Re: [Pyusb-users] PyUSB 2.6

2009-01-02 Thread Jim Easterbrook
Karl Ostmo wrote: > I use this approach in my code: > > try: > self.handle.claimInterface( 0 ) > except usb.USBError, e: > if e.message.find("could not claim interface") >= 0: > self.handle.detachKernelDriver( 0 ) > self.handl

Re: [Pyusb-users] PyUSB 2.6

2008-12-31 Thread Karl Ostmo
Hi David, I use this approach in my code: try: self.handle.claimInterface( 0 ) except usb.USBError, e: if e.message.find("could not claim interface") >= 0: self.handle.detachKernelDriver( 0 ) self.handle.claimInterface( 0 ) A

[Pyusb-users] PyUSB 2.6

2008-12-31 Thread David Portabella Clotet
Hello, I am using PyUSB 2.6 in OSX 10.5.4 (installed using Fink) to use a weather station software (http://www.jim-easterbrook.me.uk/weather/ ) When I run "python TestWeatherStation.py" without the weather station connected, it correctly says that it does not find the weather station. When I run