Bug 26030 - tkinter/threads
Summary: tkinter/threads
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: python   
(Show other bugs)
Version: 7.1
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Matt Wilson
QA Contact: David Lawrence
URL:
Whiteboard: Florence Gold
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-05 01:50 UTC by Jay Berkenbilt
Modified: 2007-04-18 16:31 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-05 22:35:04 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
example program (806 bytes, text/plain)
2001-02-05 01:51 UTC, Jay Berkenbilt
no flags Details

Description Jay Berkenbilt 2001-02-05 01:50:56 UTC
I don't know what the problem is, but the following very basic threaded
Tkinter program doesn't work under Fisher but works fine under RedHat 6.2.
This program should pop up a little window and count inside that window.

I am attaching this script as a file as well as including it here in the
body.


import Tkinter
import threading
import time

class Count:

    def __init__(self, master):
        self.__master = master
        frame = Tkinter.Frame(master).pack()
        self.__v = Tkinter.StringVar()
        Tkinter.Label(frame, textvariable=self.__v).pack()

        self.__th = threading.Thread(target=self.__count)
        self.__th.start()

    def __drawText(self, text):
        print text
        self.__v.set(text)

    def __count(self):
        i = 0
        while 1:
            time.sleep(1)
            self.__drawText(str(i))
            i = i + 1


root = Tkinter.Tk()
Count(root)
root.mainloop()

Comment 1 Jay Berkenbilt 2001-02-05 01:51:44 UTC
Created attachment 8979 [details]
example program

Comment 2 Glen Foster 2001-02-05 22:34:59 UTC
We (Red Hat) should really try to fix this before next release.

Comment 3 Tim Powers 2001-02-13 18:11:37 UTC
This is actually a problem with the tcltk packages we shipped. Since it has been
downrev'ed it works.

I am resolving this as "rawhide" since the tcltk packages there fix the problem now.

Tim

Comment 4 Jay Berkenbilt 2001-02-14 05:22:29 UTC
Can you tell me which packages to grab from rawhide?  I checked
ftp://ftp.redhat.com/rawhide/i386/RedHat/RPMS and all the tk* and tcl* packages
there are the same versions that I have installed in Fisher.  I'd like to
download and test with these since I have other python/tkinter programs that
crash under Fisher and I'd like to make sure that they all work with this fix. 
(They all do what my example program does; i.e., update a tk variable from a
second thread, but you never know when more than one factor may be involved...)

Thanks.

On my system:

rpm -qa | egrep '(tcl|tk)'
tksysv-1.3-2
tcl-8.3.2-50
gtk+-1.2.8-10
tclx-8.2.0-50
gtk-engines-0.10-11
pygtk-libglade-0.6.6-5
pygtk-0.6.6-5
rep-gtk-0.15-3
rep-gtk-libglade-0.15-3
tkinter-1.5.2-29
gtksee-0.5.0-7
tk-8.3.2-50
rep-gtk-gnome-0.15-3
gtk+-devel-1.2.8-10


Comment 5 Jay Berkenbilt 2001-02-24 05:59:48 UTC
Just confirming that this does work in Wolverine.  Thanks.


Note You need to log in before you can comment on or make changes to this bug.