on-internet
← Community

Tkinter -- "window is not defined"

Stack Overflow ·

I am a newbie in Python GUI's so I am using an online tutorial. When I run the following code, I get an error saying 'window' is not defined. I am using a Windows PC with Windows 7 and Python 3.3 installed. from tkinter import * window.title("Test Window") window.geometry('300x300') window.wm_iconbitmap('Generals.ico') # Generals.ico is a filename for the window icon lbl = tkinter.Label(window, text='Label') lbl.pack() window.mainloop()

Comments

Sign in or sign up to comment and upvote.

No comments yet.