Tkinter is a cross-platform GUI framework that comes built into the Python standard library. Since it is a cross-platform framework, the same code can be used on any operating system, such as Linux, macOS, and Windows. Tkinter provides an object-oriented interface to the Tk GUI toolkit.
Other available GUI development platforms include wPython and JPython.
Compared to other available options, Tkinter is lightweight and easy to use. Therefore, it is the go-to choice for quickly building applications that can operate cross-platform and do not require a modern look.
tkinter
provides a variety of common GUI elements that can be used to build interfaces. These
To install the tkinter
module in Python 3.8, run the following command in the command line:
pip install tkinter
The following command imports the tkinter
module in our Python source code:
import tkinter as tk