Python tkinter Module
Example
Create a simple GUI window:
import tkinter as tk
print('tkinter is available')
print('Standard GUI toolkit for Python')
Try it Yourself »
Definition and Usage
The tkinter module is Python's standard GUI (Graphical User Interface) toolkit based on Tk.
Use it to create desktop applications with windows, buttons, menus, and other graphical elements.
Members
Member | Description |
---|---|
Button | Widget for clickable buttons. |
Canvas | Widget for drawing graphics. |
Entry | Widget for single-line text input. |
Frame | Container widget for organizing other widgets. |
Label | Widget for displaying text or images. |
Listbox | Widget for displaying a list of items. |
Menu | Widget for creating menus. |
Text | Widget for multi-line text input/display. |
Tk | Class for creating the main application window. |