Python Async IO Resources
asyncio.org
asyncio.org
I'm using Python 3 because I'm using the new asyncio library designed by Guido. So far, it is working out really well. There was some learning curve to get started but now it is very easy to add new modules to the system. I designed a very lightweight version of an internal message bus, similar to NASA's GMSEC. This allows separate modules to communicate without tight coupling between them.
The asyncio library doesn't have high-level support for socketcan so I had to use some lower level facilities. That took a little research and some digging through the asyncio source. The asynchronous design provides great responsiveness without heavy resource use (CPU or memory). I've done other similar systems using threads or polling but this Python 3 version is more elegant by far.
It would have been nicer if the migration path from Python 2 to 3 was smoother. However, after using it for serious work, Python 3 works great. I still wish 'print' was a keyword or there was some other debugging version of print (e.g. "dump var1, var1"). That's not a showstopper though.
It was exactly what I needed for a personal project (a fast webscraping thing); before asyncio I went for the threads solution, but this thing performs one thousand times better.
I am really optimistic about this library, as the fact that is a core lib will make I/O with python A LOT easier.
[1]: http://compiletoi.net/fast-scraping-in-python-with-asyncio.h...
Twisted, gevent, tornado, etc. were newer projects and built to overcome the deficiencies and crudeness of asyncore. E.g.: https://mail.python.org/pipermail/python-ideas/2012-Septembe...
Asyncio is sort of a meta project to standardize and improve async in python, learning from all the work that's happened in the intervening years.