Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Traceback (most recent call last):
- File "tkinter_basic_frame.py", line 4, in <module>
- from Tkinter import Tk, Frame, BOTH
- File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 42, in
- raise ImportError, str(msg) + ', please install the python-tk package'
- ImportError: No module named _tkinter, please install the python-tk package
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- from Tkinter import Tk, Frame, BOTH
- class Example(Frame):
- def __init__(self, parent):
- Frame.__init__(self, parent, background="white")
- self.parent = parent
- self.initUI()
- def initUI(self):
- self.parent.title("Simple")
- self.pack(fill=BOTH, expand=1)
- def main():
- root = Tk()
- root.geometry("250x150+300+300")
- app = Example(root)
- root.mainloop()
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement