Thank you Wander for reply.

I have found the problem. Actually I was creating the USB connection from the 
main window frame thus it was giving error and required to close the window.
Now I have taken the connection code out of the window frame creation class. 
Thus connection is closing now.

Thanks again.


-----Original Message-----
From: Wander Lairson Costa [mailto:wander.lair...@gmail.com] 
Sent: Monday, 15 September 2014 7:46 a.m.
To: pyusb-users
Subject: Re: [pyusb-users] PyUSB Release USB Device

Em 02/09/2014 03:25, "Prashant Patel" <prash...@wipath.co.nz> escreveu:
>
> Hi,
>
>
>
> I am currently working on PyUSB. As I am new to USB, I don’t know, how can I 
> do the following.
>
>
>
> I have successfully connected to my USB Device hardware from Python PyUSB. In 
> the code I required to reset the USB Device hardware.
>
> Which I did by sending a command to the hardware. Now after hardware reset, I 
> want to release the current USB device from Python PyUSB.
>
> And then I want to connect again to the USB Device Hardware after it come 
> back from reset.
>
>
>
> Please let me know, how can I release the USB Device Connection and 
> interfaces etc so that I can reconnect?
>
>

You have use the dispose_resources from util module:

from usb.util import dispose_resource
dispose_resources(device)

Regards,
Wander

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce Perforce version control. 
Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to