Bug 26030 - tkinter/threads
tkinter/threads
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: python (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Matt Wilson
David Lawrence
Florence Gold
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-04 20:50 EST by Jay Berkenbilt
Modified: 2007-04-18 12:31 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-05 17:35:04 EST
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-04 20:51 EST, Jay Berkenbilt
no flags Details

  None (edit)
Description Jay Berkenbilt 2001-02-04 20:50:56 EST
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-04 20:51:44 EST
Created attachment 8979 [details]
example program
Comment 2 Glen Foster 2001-02-05 17:34:59 EST
We (Red Hat) should really try to fix this before next release.
Comment 3 Tim Powers 2001-02-13 13:11:37 EST
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 00:22:29 EST
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 00:59:48 EST
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.