Comments (1)
The snippet in the tutorial works perfectly fine as is. And the reason is the same as why your modification also currently works: internally, find_descriptor
iterates on its desc
parameter to find the suitable(s) inner descriptor(s). Iterating over an Interface yields its Endpoints; and Interface.endpoints()
is just a wrapper over that.
However, find_descriptor
expects a descriptor, not an iterator. The current implementation does just use desc.__iter__
, but that could change in the future. So the snippet is the tutorial is correct and also the recommended usage.
(Even if Iterface.endpoints()
might be more explicit and, thus, desirable in other contexts).
from pyusb.
Related Issues (20)
- libusb stress_mt.c conversion to pyusb HOT 16
- usb.core.USBError: [Errno 22] Invalid parameter while using dev.ctrl_transfer in Windows HOT 1
- Closed
- usb.core.USBError: [Errno 19] No such device (mac os M1) HOT 1
- Usb python
- USB
- PyUSB does not seem to be properly installed one one computer HOT 3
- `bytearray()` buffers in addition to `array.array`
- There was an error in the subpackage sending, the first normal sending and the second direct error report, the agreed code c is fine HOT 5
- USB (-ENOENT) (-2) wireshark Error
- usb.core.NoBackendError: No backend available
- [Errno 13] Access denied (insufficient permissions)
- Very laggy when reading data from device HOT 2
- usb.core.USBError: [Errno 5] Input/Output Error when trying to send feature report to device HOT 1
- Timeout Problem with Raspberry Pi 5 USB Port Output HOT 1
- No Backend available MAC HOT 1
- The library need a stub-files to simplify usage HOT 2
- [question] UsbError description HOT 1
- [question] Is there some fake backend?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyusb.