A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-list/1999-September/018187.html below:

threads and Tk

threads and Tk threads and TkFredrik Lundh fredrik at pythonware.com
Tue Sep 21 18:31:57 EDT 1999
Eric I. Arnoth <earnoth at home.com> wrote:
> How do the Tk mainloop() and transient() methods interact
> with python's built in threading capabilities?

you're on thin ice here...

here's a simpler solution (which is guaranteed to work).

1. run the server thread as usual.  when you receive
data, push them to a Queue object (as provided by
the module with the same name).

2. over in Tkinter land, running under the main thread,
use an idletask to poll the queue (using get_nowait) every
100ms or so, and display the dialogue as necessary.

(personally, I'd forget about threads, and use asynclib
instead, but that's another story).

hope this helps!

</F>



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4