On Fri, Jan 8, 2016 at 4:38 PM, igor bezenchuk wrote:
>
> Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit
> (
> D64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import usb.core
>>>> dev=usb.core.find(find_all=True)
>>>> print(dev)
> <generator object device_iter at 0x00000000030EEE58>
>
> looks like it dosn't return any device found(other than Generator Object,
> which I am not sure what it is exactly) I tried it on more than one machine
> with similar conditions(windows 10 and windows 8.1 both with libusb 1.0.20
> and pyusb1 and python 3.4.

find_all=True returns a list of devices (please see e.g.
https://github.com/walac/pyusb/blob/master/docs/tutorial.rst)

You must iterate through the list:
devices = usb.core.find(find_all=True)
for dev in devices:
    print (dev.idProduct, dev.idVendor)

Probably you want to just find your device, and not all. It is all
explained in the tutorial.

Tormod

------------------------------------------------------------------------------
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to