GNU Readline and asyncio

Chris Angelico rosuav at gmail.com
Wed Jul 18 22:01:21 EDT 2018


Has anyone put together a straight-forward example of using asyncio
with readline? For example, suppose you have a command line program
that accepts control commands via readline, while accepting socket
connections to do its actual work. I can do that in a threaded way
fairly easily (spin off a thread for every connection, then leave the
main thread managing the console), and it's not too hard to convert to
async when using plain vanilla reads from stdin, but I'm not so sure
about readline.

ChrisA



More information about the Python-list mailing list