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


Groups > comp.lang.python > #98042

Re: Multithreading python,two tkinter windows

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Laura Creighton <lac@openend.se>
Newsgroups comp.lang.python
Subject Re: Multithreading python,two tkinter windows
Date Sun, 01 Nov 2015 15:26:52 +0100
Lines 21
Message-ID <mailman.21.1446388018.4463.python-list@python.org> (permalink)
References <271f8b42-da03-40fd-8a8b-c562292577e6@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de Zn4L2eA6Ccf/WECF9vCM9gMtAeBFwoFjkTR5mLQ/bW1g==
Return-Path <lac@openend.se>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:two': 0.07; 'cc:addr:python-list': 0.09; '(written': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'threads.': 0.09; 'python': 0.10; 'subject:python': 0.14; 'basic.': 0.16; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'stuff.': 0.16; 'subject:windows': 0.16; 'threads': 0.16; 'laura': 0.18; '2015': 0.20; 'cc:addr:python.org': 0.20; 'cc:2**1': 0.22; 'do.': 0.22; 'controlling': 0.22; 'tkinter': 0.22; 'code,': 0.23; 'received:se': 0.29; 'thread,': 0.29; 'url:activestate': 0.29; 'cc:no real name:2**1': 0.29; 'code': 0.30; 'url:code': 0.34; 'next': 0.35; 'nov': 0.35; 'problem.': 0.35; 'basic': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'several': 0.38; 'your': 0.60; 'header:Message-Id:1': 0.61; 'more': 0.63; 'tasks.': 0.66; 'subject:skip:M 10': 0.72; 'subject:,': 0.82; 'header:In- reply-to:1': 0.84; 'url:recipes': 0.84; 'outlines': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=openend.se; s=default; t=1446388013; bh=0mrtPlegFFbZVtw7yagQUGELUtepbhv95GXnOrwEofM=; h=To:cc:From:Subject:In-reply-to:References:Date:From; b=TIBDTgp1WWBUrqZB8IiTh+u1FxHI9rSyKP1Bs5u9a9ztfRTSi/m2BiS1Ksojlix5c a6jSXv/BlusHVWXmwoPjTPFG+D7H6F2HWAzwD6CciNGQIDvBxGjP9AhHQ/dzBbLxbU 1xrkBNi09r00JRmQ23aKKtsQNX5blutmQUdqLsKc=
In-reply-to <271f8b42-da03-40fd-8a8b-c562292577e6@googlegroups.com>
Comments In-reply-to Vindhyachal Takniki <vindhyachal.takniki@gmail.com> message dated "Sun, 01 Nov 2015 06:05:58 -0800."
Content-ID <22462.1446388011.1@fido>
X-Greylist Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [82.96.5.2]); Sun, 01 Nov 2015 15:26:53 +0100 (CET)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:98042

Show key headers only | 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