Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9
The easiest library for creating GUIs in Python
License
kujirahand/tkeasygui-python
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
TkEasyGUI is the easiest library for creating GUIs in Python.
This library allows you to easily create GUI applications with Python.Since it is based on Tkinter, it runs consistently on Windows, macOS, and Linux.With a variety of built-in dialogs and customizable forms, you can develop applications effortlessly.
- Windows / macOS / Linux (Tkinter required)
Install package fromPyPI.
pip install TkEasyGUI# orpython -m pip install TkEasyGUIInstall package fromGitHub Repository.
python -m pip install git+https://github.com/kujirahand/tkeasygui-python
- Python's standard UI library
Tkinter, is often considered to have a high barrier to entry and to be difficult to use. By using this library, you can create GUI applications easily and intuitively. - This package supports type hints, allowing property selection via code completion.
Python 3.9 or lateris required. - In the event model, it is compatible with the well-known GUI library
PySimpleGUI. - This project adopts the lenient MIT license. This license will not change in the future. Let's enjoy creating GUI programs.
Using TkEasyGUI is simple. If you only want to display a dialog, it requires just two lines of code.
importTkEasyGUIaseg# Show Text dialogeg.print("A joyful heart is good medicine.")
Ask the user for their name and display that name in the window.
importTkEasyGUIaseg# Show Input dialogname=eg.input("What is your name?")eg.print(f"Hello,{name}.")
Furthermore, a dialog is available that allows specifying multiple input fields.
importTkEasyGUIaseg# Show Form dialogform=eg.popup_get_form(["Name","Age","Hobbies"])ifform:name=form["Name"]age=form["Age"]hobbies=form["Hobbies"]eg.print(f"name={name}, age={age}, hobby={hobbies}")
TkEasyGUI provides a variety of dialogs. For example, a color selection dialog, a file selection dialog, and a calendar dialog.
To create a simple window with only labels and buttons, you would write as follows:
importTkEasyGUIaseg# define layoutlayout= [ [eg.Text("Hello, World!")], [eg.Button("OK")]]# create a windowwitheg.Window("Hello App",layout)aswindow:# event loopforevent,valuesinwindow.event_iter():ifevent=="OK":eg.print("Thank you.")break
You can describe it using an event model similar to the famous GUI library, PySimpleGUI.
importTkEasyGUIaseg# define layoutlayout= [ [eg.Text("Hello, World!")], [eg.Button("OK")]]# create a windowwindow=eg.Window("Hello App",layout)# event loopwhileTrue:event,values=window.read()ifeventin ["OK",eg.WINDOW_CLOSED]:eg.popup("Thank you.")break# close windowwindow.close()
We have prepared a selection of samples to demonstrate simple usage. Please check them out.
Runningtests/file_viewer.py allows all samples to be easily launched.
Below is a detailed list of classes and methods.
Japanese tutorials:
- TkEasyGUI - Pythonで最も素早くデスクトップアプリを創るライブラリ
- マイナビニュースPython連載116回目 - 合計/整形/コピーのツールを作ろう
- (Book) Pythonでつくるデスクトップアプリ メモ帳からスクレイピング・生成AI利用まで
- (Magazine) 日経ソフトウエア2025年5月号の特集記事 - TkEasyGUIを使ってみよう
There are other helpful articles as well.
- When using basic functionalities, it is compatible with PySimpleGUI. Programs can be written using the same event-driven model as PySimpleGUI.
- The names of basic GUI components are kept the same, but some property names differ.
- TkEasyGUI has been completely reimplemented from scratch and is licensed under the MIT License.
- However, full compatibility with PySimpleGUI is not intended.
- Using a
forloop andwindow.event_iter()enables straightforward event processing. - Custom popup dialogs, such as a color selection dialog(
eg.popup_color), a list dialog(eg.popup_listbox), form dialog(eg.popup_get_form) are available. - The
Imageclass supports not only PNG but also JPEG formats. - Convenient event hooks and features for bulk event registration are provided -docs/custom_events.
- Methods such as Copy, Paste, and Cut are added to text boxes (Multiline/Input).
- The system's default color scheme is utilized.
It works on Raspberry Pi OS as well. Please pay attention to the following points during installation:
- Use Python 3.9 or higher.
- Pillow (not PIL) is required. Please run the following command:
pip install --upgrade --force-reinstall pillow- If this does not work, uninstall the old system version of Pillow and reinstall it:
sudo apt remove python3-pilpip install pillow
- Tkinter is pre-installed on Raspberry Pi, but the
python3-tkpackage is required. Please run the following command:sudo apt-get install python3-tk
About
The easiest library for creating GUIs in Python
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.



