graphical user interface (GUI) | Python Glossary – Real Python

A graphical user interface (GUI) is a visual way of interacting with a program through windows, buttons, menus, and other on-screen elements. Instead of typing text commands in a terminal, users interact through actions like clicking, dragging, dropping, and scrolling. Most desktop and mobile applications use GUIs.

In Python, the standard library includes tkinter for building GUIs with basic widgets like labels, buttons, text fields, and drop-down menus.

For more complex applications, third-party libraries like PyQt and PySide provide richer widget sets and tools, such as a visual form designer.

Unlike a command-line interface (CLI), a GUI doesn’t require users to memorize commands, but it typically takes more code to build.

Example

A minimal GUI app built with tkinter:

Running this script opens a small window that displays the text “Hello, Pythonista!”

Python GUI Programming With Tkinter

For additional information on related topics, take a look at the following resources: