Home>

I have 2 pieces of code. In the first -receiving events, in the second -the input, which is in the while True:

loop
@ account.message_handler ()
    ...
while True:
    input= input ('>')

I need the code to be able to simultaneously output the received events, and also not to close the input line. How can this be done?

Try to run it all in different threads (processes). though input /output to one console at the same time is not very convenient. Or think about the architecture of your application, you can implement something differently.

Kers2021-02-23 18:30:42

Look towards curses or urwid

Roman Konoval2021-02-23 18:30:42