[Tkinter-discuss] TKinter and Python asyncio

c.buhtz at posteo.jp c.buhtz at posteo.jp
Wed Dec 20 15:25:55 EST 2017


Dear Bhaskar,

thank you very much for your answer and the links.

On 2017-12-20 13:06 Bhaskar Chaudhary <bha100710 at gmail.com> wrote:
> Here's a very simple example I borrowed from
> http://blog.iharder.net/2017/02/03/python-asyncio-and-tkinter-together-with-tcp-and-udp/:
> This listens for tcp messages on port 9999 and prints it to a Tkinter
> label as and when the message arrives.
> [..]
> Also note that in the above example - the async i/o loop is run in a
> separate thread. But that is just one thread to handle and it is much
> better tan handling one new thread for every new request.

It also came to my (and others) minds to separate each loop in it's own
thread. But I am for a way from being a professional in that topics.

I created a minimal working example to ask that question on
StackOVerflow, too. There is no multithreading in that example.

Now I modified that example "based" on your solution. But the GUI is
still freezing why my tasks are working. Your solution is a bit to
complex for me and use some techniques (the server think) I don't know.

Could you please throw an eye on the current state of my code?

More information about the Tkinter-discuss mailing list