Re: async serial port in Python.
On 18/12/2017 23:20, Les Cargill wrote: What I'd like to do is set up *some* sort of method in Python to asynchronously use callbacks to receive characters from a serial port or 20 serial ports. If I have to hook an event loop or even spawn a thread - fine! but it needs to allow for making things event-driven. For lack of a better term, I'd like this to at least have "select()/epoll() semantics". And then I'd like to extend that to TCP and UDP ports. Is this even possible? I keep running into "not done yet" stuff on this front, but I'm not very up on Python. It may be ... what's the term ... ? ... un-Pythonic, and I would accept that as an explanation. And no, I do not have a pet distro or version of Python. Any is fine with me. I've use Chris Liechti's pySerial very successfully several times on Python 2.7 and earlier and just a test with 3.6. Easy enough to access it from Python threads. I'm stuck with Windoze so have used COMx: port access to both PC native serial port (I have old kit) and USB virtual serial ports. No idea about xNix. -- https://mail.python.org/mailman/listinfo/python-list
Re: async serial port in Python.
Les Cargill wrote: What I'd like to do is set up *some* sort of method in Python to asynchronously use callbacks to receive characters from a serial port or 20 serial ports. If I have to hook an event loop or even spawn a thread - fine! but it needs to allow for making things event-driven. For lack of a better term, I'd like this to at least have "select()/epoll() semantics". And then I'd like to extend that to TCP and UDP ports. Is this even possible? I keep running into "not done yet" stuff on this front, but I'm not very up on Python. It may be ... what's the term ... ? ... un-Pythonic, and I would accept that as an explanation. And no, I do not have a pet distro or version of Python. Any is fine with me. The Brent Welch book for Tcl has a totally complete example of this laid out in great detail. That's so 15-20 years ago - try to catch up, guys :) Update: Found this: http://pyserial-asyncio.readthedocs.io/en/latest/index.html Seems to work. It's still "experimental"? -- Les Cargill -- https://mail.python.org/mailman/listinfo/python-list
async serial port in Python.
What I'd like to do is set up *some* sort of method in Python to asynchronously use callbacks to receive characters from a serial port or 20 serial ports. If I have to hook an event loop or even spawn a thread - fine! but it needs to allow for making things event-driven. For lack of a better term, I'd like this to at least have "select()/epoll() semantics". And then I'd like to extend that to TCP and UDP ports. Is this even possible? I keep running into "not done yet" stuff on this front, but I'm not very up on Python. It may be ... what's the term ... ? ... un-Pythonic, and I would accept that as an explanation. And no, I do not have a pet distro or version of Python. Any is fine with me. The Brent Welch book for Tcl has a totally complete example of this laid out in great detail. That's so 15-20 years ago - try to catch up, guys :) -- Les Cargill -- https://mail.python.org/mailman/listinfo/python-list