Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tkinter
- window = tkinter.Tk()
- # to rename the title of the window
- window.title("GUI")
- # pack is used to show the object in the window
- label = tkinter.Label(window, text="Hello World!").pack()
- window.mainloop()
- # error
- Traceback (most recent call last):
- File "C:/Users/raphp/PycharmProjects/LearnPython/Intermediate/tkinter.py", line 1, in <module>
- import tkinter
- File "C:\Users\raphp\PycharmProjects\LearnPython\Intermediate\tkinter.py", line 3, in <module>
- window = tkinter.Tk()
- AttributeError: module 'tkinter' has no attribute 'Tk'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement