Kernel: Python 3
tkinter
Links
Examples
tk01.py - simplest tkinter program
In [1]:
---------------------------------------------------------------------------
TclError Traceback (most recent call last)
<ipython-input-1-0241d74fad0b> in <module>()
1 import tkinter as tk
2
----> 3 root = tk.Tk()
4 root.mainloop()
/usr/lib/python3.4/tkinter/__init__.py in __init__(self, screenName, baseName, className, useTk, sync, use)
1857 baseName = baseName + ext
1858 interactive = 0
-> 1859 self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
1860 if useTk:
1861 self._loadtk()
TclError: no display name and no $DISPLAY environment variable
tk02.py - creating a frame
In [ ]:
tk03.py - creating a button and putting it in a frame
In [ ]:
tk04.py - a class structure
In [ ]:
tk05.py - different ways to define a widget
In [ ]:
tk06.py - packing
In [ ]:
tk07.py - event binding
In [ ]: