Advertisement
Guest User

Untitled

a guest
Aug 20th, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. Traceback (most recent call last):
  2. File "tkinter_basic_frame.py", line 4, in <module>
  3. from Tkinter import Tk, Frame, BOTH
  4. File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 42, in
  5. raise ImportError, str(msg) + ', please install the python-tk package'
  6. ImportError: No module named _tkinter, please install the python-tk package
  7.  
  8. #!/usr/bin/python
  9. # -*- coding: utf-8 -*-
  10.  
  11. from Tkinter import Tk, Frame, BOTH
  12.  
  13.  
  14. class Example(Frame):
  15.  
  16. def __init__(self, parent):
  17. Frame.__init__(self, parent, background="white")
  18.  
  19. self.parent = parent
  20.  
  21. self.initUI()
  22.  
  23. def initUI(self):
  24.  
  25. self.parent.title("Simple")
  26. self.pack(fill=BOTH, expand=1)
  27.  
  28.  
  29. def main():
  30.  
  31. root = Tk()
  32. root.geometry("250x150+300+300")
  33. app = Example(root)
  34. root.mainloop()
  35.  
  36.  
  37. if __name__ == '__main__':
  38. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement