Strange Tkinter trouble
gregholmes at my-deja.com
gregholmes at my-deja.com
Tue Jun 20 16:40:16 EDT 2000
I'm not sure if this is the problem, but you need a variable to point
to that root window if you are going to do anything with it.
For example:
from Tkinter import *
root=Tk()
w = Label(root, text="Hello, world!")
w.pack()
root.mainloop()
(this from An Introduction to Tkinter by Lundh)
Bjoern Giesler <un4e at rzstud1.rz.uni-karlsruhe.de> wrote:
> Here is the error message I'm getting:
>
> [snip]
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> from Tkinter import *
> >>> Tk()
> 'None','','Tk' # These are the values of {screen,base,class}Name below
> Traceback (innermost last):
> File "<stdin>", line 1, in ?
> File "/org/opt/python/lib/python1.5/lib-tk/Tkinter.py", line 887, in
> __init__
> self.tk = _tkinter.create(screenName, baseName, className)
> TclError: couldn't stat "": no such file or directory
> >>>
> [snip]
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list