I have a prob
Joal Heagney
s713221 at student.gu.edu.au
Fri Aug 24 06:02:08 EDT 2001
Patio87 wrote:
>
> I am like 2 hours into learning Tk/tcl and I keep getting this error
> first i'll show you the code
>
> import _tkinter
> import sys
> win = _TK()
> button = Button(win, text = "Goodbye", command = sys.exit)
> button.pack()
> mainloop()
>
> thats the code heres the error
>
> Traceback (most recent call last):
> File "C:/Python21/s", line 3, in ?
> win = _TK()
> NameError: name '_TK' is not defined
>
> please help me im still learning python so be easy on the vocabulary thanks
import Tkinter
....
win = Tkinter.Tk()
....
win.mainloop()
or (Really NOT suggested. It makes things crowded in your current
module)
from Tkinter import *
.........
win = Tk()
<as above>
--
Joal Heagney is: _____ _____
/\ _ __ __ _ | | _ ___ |
/__\|\ || ||__ |\ || |___|/_\|___] |
/ \ \_||__ ||___| \_|! | | \ \ !
More information about the Python-list
mailing list