Newbie: display a frame (that's a class attribute) hangs
Spendius
spendius at muchomail.com
Thu Dec 5 11:07:47 EST 2002
Hello,
I'm just trying the following:
>from Tkinter import *
>import tkFont
>
>class Displayer():
> def __init__(self):
> self.initFrame()
> print "OK i'm here"
> mainloop()
> print "i'm there"
>
> def initFrame(self):
> hframe = Frame(bd=5)
> [etc...]
I display this window by calling from another script:
>window = Displayer()
I can see the window appear, but then everything hangs (if I remove
the 'mainloop()', nothing appears on my screen). I tried also with
>root = Tk()
>window = Displayer(root) #and modified Displayer '__init__' as well of course
>root.mainloop()
but it doesn't help. What does it stay blocked ? (I don't see the
message "i'm there" in my DOS window)
I'm using Python 2.2.2 on NT.
Thanks !
Spendius
More information about the Python-list
mailing list