Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98042

Re: Multithreading python,two tkinter windows

From Laura Creighton <lac@openend.se>
Newsgroups comp.lang.python
Subject Re: Multithreading python,two tkinter windows
Date 2015-11-01 15:26 +0100
Message-ID <mailman.21.1446388018.4463.python-list@python.org> (permalink)
References <271f8b42-da03-40fd-8a8b-c562292577e6@googlegroups.com>

Show all headers | View raw


In a message of Sun, 01 Nov 2015 06:05:58 -0800, Vindhyachal Takniki writes:
>I have made a python code & using multithreading in it. this is very basic code, not using queues & other stuff.

This is your problem.
The code that uses queues is more basic.
For tkinter you cannot use threads like you do.
You must have one controlling thread, and several worker threads.
The best way to do this is using a queue.

http://code.activestate.com/recipes/82965-threads-tkinter-and-asynchronous-io/

(written by a freind of mine, wandering around in the next room)

outlines how to set this up  for all your tkinter tasks.

Laura

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Multithreading python,two tkinter windows Vindhyachal Takniki <vindhyachal.takniki@gmail.com> - 2015-11-01 06:05 -0800
  Re: Multithreading python,two tkinter windows Laura Creighton <lac@openend.se> - 2015-11-01 15:26 +0100
  Re: Multithreading python,two tkinter windows Chris Angelico <rosuav@gmail.com> - 2015-11-02 01:31 +1100
  Re: Multithreading python,two tkinter windows Terry Reedy <tjreedy@udel.edu> - 2015-11-01 18:12 -0500

csiph-web