Tkinter

Dave Touretzky edited this page Jan 7, 2017 · 5 revisions

Tkinter is Python's interface to the Tcl/Tk GUI toolkit. Note that in Python 3 the package name is "tkinter", not "Tkinter" as it was in Python 2. Cozmo requires Python 3.

Anki chose Tkinter to provide their camera viewer because "it seems to be the only Python UI option that works easily (without forcing a lot of complex installation steps) across Windows, macOS and Linux" (cite).

Unfortunately, Tkinter is somewhat broken on the Mac and doesn't play nicely with the simple_cli or world_viewer tools, although simple_cli is still usable.

Installing Tkinter

To install Tkinter on Ubuntu, do:

 $ apt-get install python3-tk

To use the package, include the following in your Python code:

 import tkinter as tk

Tkinter Resources

Thinking in Tkinter by Stephen Ferg offers a good tutorial.

Tkinter wiki is a reference resource.

Tkinter page at the Python.org wiki has lots of links to tutorials and other resources.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.