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
async
for parallelisation of tasks, however, in its current design, some parameters may be read fromstdin
while the event loop is active. Currently, it looks like I'll need to addprompt-toolkit
as a dependency as it offers async support for input. However, if an extra dependency can be avoided, I'd love to userich
for my input as well as my output.With that in mind, is there a way I can use
Console.input
in anasync
context without blocking the event loop?Beta Was this translation helpful? Give feedback.
All reactions