Tkinter

Tkinter (tkinter in Python 3.x) claims to be "most portable GUI toolkit for Python" and is Python's "de-facto standard GUI (Graphical User Interface) package". Although there are several other graphical toolkits for Python, Tkinter is the one most often used.

Installation
On Gentoo, getting Tkinter can be accomplished by directly emerging the package and/or by modifying your system's use flags. Since Tkinter is build on tcl and tk, both of which are closely related to Python, you can get the package by updating your system's global use flags and re-emerging Python. Using this method of installation will pull the packages needed to successfully run Tkinter.

First, modify your make.conf:

Next, re-emerge Python using this command:

That's it! You've installed Tkinter!

Using tk
When attempting to use Tkinter in your Python code, depending on the version(s) of Python are currently installed on your system, you'll have to import Tkinter in different ways:


 * Use the  if using Python 2.x.
 * Use the  (note the lower case T) if using Python 3.x.