Guest User

Untitled

a guest
May 11th, 2015
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. Last login: Sun May 10 14:05:02 on ttys000
  2. Nikolass-MBP:~ nikolas$ python3
  3. Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 23 2015, 02:52:03)
  4. [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
  5. Type "help", "copyright", "credits" or "license" for more information.
  6. >>> import tkinter
  7. >>> root = tkinter.Tk()
  8. >>> myLabel = tkinter.Label(root, text="This is now working")
  9. >>> myLabel.pack()
  10. >>> root.mainloop()
  11. >>> exit()
  12. Nikolass-MBP:~ nikolas$ cd ./Documents/Python
  13. Nikolass-MBP:Python nikolas$ python3
  14. Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 23 2015, 02:52:03)
  15. [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
  16. Type "help", "copyright", "credits" or "license" for more information.
  17. >>> import tkinter
  18. Traceback (most recent call last):
  19. File "<stdin>", line 1, in <module>
  20. File "/Users/nikolas/Documents/Python/tkinter.py", line 3, in <module>
  21. root = tkinter.Tk()
  22. AttributeError: 'module' object has no attribute 'Tk'
  23. >>> exit()
  24. Nikolass-MBP:Python nikolas$ python3 tkinter.py
  25. Traceback (most recent call last):
  26. File "tkinter.py", line 1, in <module>
  27. import tkinter
  28. File "/Users/nikolas/Documents/Python/tkinter.py", line 3, in <module>
  29. root = tkinter.Tk()
  30. AttributeError: 'module' object has no attribute 'Tk'
  31. Nikolass-MBP:Python nikolas$
Advertisement
Add Comment
Please, Sign In to add comment