Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

python
community creator

What is Tkinter?

Mohammad Razi ul Haq

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

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.

Why use Tkinter?

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.

The Tkinter module in Python allows us to build GUI applications in Python.

tkinter provides a variety of common GUI elements that can be used to build interfaces. These elementscalled widgets include buttons, menus, and various kinds of entry fields and display areas.

Install Tkinter

To install the tkinter module in Python 3.8, run the following command in the command line:

pip install tkinter

Importing Tkinter in Python source code

The following command imports the tkinter module in our Python source code:

import tkinter as tk

RELATED TAGS

python
community creator

CONTRIBUTOR

Mohammad Razi ul Haq

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring