Python async: Waiting for stdin input while doing other stuff

You can use the aioconsole third-party package to interact with stdin in an asyncio-friendly manner:

line = await aioconsole.ainput('Is this your line? ')

Leave a Comment