示例#1
0
文件: core.py 项目: atgarcia78/pyusb
 def device_iter(**kwargs):
     for dev in backend.enumerate_devices():
         d = Device(dev, backend)
         tests = (val == getattr(d, key) for key, val in kwargs.items())
         if _interop._all(tests) and (custom_match is None
                                      or custom_match(d)):
             yield d
示例#2
0
 def desc_iter(**kwargs):
     for d in desc:
         tests = (val == getattr(d, key) for key, val in kwargs.items())
         if _interop._all(tests) and (custom_match is None or custom_match(d)):
             yield d
示例#3
0
文件: core.py 项目: sergiusens/pyusb
 def device_iter(**kwargs):
     for dev in backend.enumerate_devices():
         d = Device(dev, backend)
         tests = (val == getattr(d, key) for key, val in kwargs.items())
         if _interop._all(tests) and (custom_match is None or custom_match(d)):
             yield d
示例#4
0
文件: util.py 项目: Chadizzm/pyusb
 def desc_iter(**kwargs):
     for d in desc:
         tests = (val == getattr(d, key) for key, val in kwargs.items())
         if _interop._all(tests) and (custom_match is None or custom_match(d)):
             yield d