This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dhalbert
Recipients dhalbert, gvanrossum, serhiy.storchaka, terry.reedy
Date 2019-05-08.04:18:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
>Dan, slightly OT, but I am curious whether one can access USB ports (in a system-dependent manner) directly from python code via os.system and ctypes?

Do you mean from CircuitPython? The USB impplementation provides HID keyboard, mouse, and gamepad devices, CDC (serial), MIDI, and MSC (CIRCUITPY). We don't provide ctypes (though MicroPython does), but there are native modules that provide access to these devices. We will are planning to add user-defined USB descriptors.

Also, we provide some enhancements in a CircuitPython-specific module to peek for input on CDC, so you can know when to call `input()`, without using the usual OS-dependent Python tricks for this.

Right now REPL input/output is mixed with user input, as you mention, but we're considering adding a second serial CDC port so you'll be able to have a second serial channel and avoid colliding with the REPL.

I'd be happy to discuss this kind of stuff with you further, by email or whatever other mechanism you have in mind, like some appropriate python mailing list or our own chat servers, etc.
Date User Action Args
2019-05-08 04:18:55dhalbertsetrecipients: + dhalbert, gvanrossum, terry.reedy, serhiy.storchaka
2019-05-08 04:18:55dhalbertsetmessageid: <>
2019-05-08 04:18:55dhalbertlinkissue36807 messages
2019-05-08 04:18:55dhalbertcreate