[issue36807] IDLE doesn't call os.fsync()

Dan Halbert report at bugs.python.org
Wed May 8 00:18:55 EDT 2019


Dan Halbert <halbert at halwitz.org> added the comment:

>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.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36807>
_______________________________________


More information about the Python-bugs-list mailing list