How can I run a prompt asynchronously? #3797
Unanswered
MaddyGuthridge
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
You could use aioconsole, which works really well. Or Textual if you want to go full TUI. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
An application I am writing makes heavy use of
asyncfor parallelisation of tasks, however, in its current design, some parameters may be read fromstdinwhile the event loop is active. Currently, it looks like I'll need to addprompt-toolkitas a dependency as it offers async support for input. However, if an extra dependency can be avoided, I'd love to userichfor my input as well as my output.With that in mind, is there a way I can use
Console.inputin anasynccontext without blocking the event loop?Beta Was this translation helpful? Give feedback.
All reactions