I have been using uasyncio to process characters from the serial console while also processing other events. However, just processing raw characters is a little inconvenient, since there's no history, no echo (by default), and no cursor handling.
My question is, is there an existing function (built-in or not) that basically acts like the builtin input() (with the cursor support, history, etc.), but is async?
Ideally something like:
Code: Select all
async def handle_user_command():
while True:
command = await async_input()
#process command
If such a function doesn't exist, then is there a way I can access the readline library from within micropython and feed it individual characters?
Any information would be greatly appreciated.