2012/3/3 Yunong Pang <029...@gmail.com>:
> It's very strange that when I use a loop to read the data, it will said
> "Operation timeout" sometimes.
>
> For example,  the loop I used is as follows,
>   ret = dev.read(0, 4096, 0, 5)
>   for i in range(74):
>      ret += dev.read(0,4096, 0, 5)
>
> It can read the data successfully, though sometimes "Operation timeout". But
> I don't know if it is the best way in Pyusb to read the data.
>

If the device has no data to send, timeout will occur. The best
approach is to handle the exception and keep trying to read.

-- 
Best Regards,
Wander Lairson Costa

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to