Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Last login: Sun May 10 14:05:02 on ttys000
- Nikolass-MBP:~ nikolas$ python3
- Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 23 2015, 02:52:03)
- [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
- Type "help", "copyright", "credits" or "license" for more information.
- >>> import tkinter
- >>> root = tkinter.Tk()
- >>> myLabel = tkinter.Label(root, text="This is now working")
- >>> myLabel.pack()
- >>> root.mainloop()
- >>> exit()
- Nikolass-MBP:~ nikolas$ cd ./Documents/Python
- Nikolass-MBP:Python nikolas$ python3
- Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 23 2015, 02:52:03)
- [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
- Type "help", "copyright", "credits" or "license" for more information.
- >>> import tkinter
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "/Users/nikolas/Documents/Python/tkinter.py", line 3, in <module>
- root = tkinter.Tk()
- AttributeError: 'module' object has no attribute 'Tk'
- >>> exit()
- Nikolass-MBP:Python nikolas$ python3 tkinter.py
- Traceback (most recent call last):
- File "tkinter.py", line 1, in <module>
- import tkinter
- File "/Users/nikolas/Documents/Python/tkinter.py", line 3, in <module>
- root = tkinter.Tk()
- AttributeError: 'module' object has no attribute 'Tk'
- Nikolass-MBP:Python nikolas$
Advertisement
Add Comment
Please, Sign In to add comment