TkEasyGUI is simple GUI Library for Python3 with Tkinter
Project description
TkEasyGUI
TkEasyGUI
is a Python library that allows for the easy and simple creation of GUI applications.
-
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. -
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.
Platform
- Windows / macOS / Linux (Tkinter required)
Install
Install from pypi
python -m pip install TkEasyGUI
Install from GitHub Repository
python -m pip install git+https://github.com/kujirahand/tkeasygui-python
- (memo) Updating from older versions (less than 0.2.24) will fail. (See the solution)
How to use
Using TkEasyGUI is simple. If you only want to display a dialog, it requires just two lines of code.
import TkEasyGUI as eg
eg.popup("A joyful heart is good medicine.")
To create a simple window with only labels and buttons, you would write as follows:
import TkEasyGUI as eg
# define layout
layout = [[eg.Text("Hello, World!")],
[eg.Button("Exit")]]
# create a window
with eg.Window("test", layout) as window:
# event loop
for event, values in window.event_iter():
if event == "Exit":
eg.popup("Thank you.")
break
You can describe it using an event model similar to the famous GUI library, PySimpleGUI.
import TkEasyGUI as eg
# define layout
layout = [[eg.Text("Hello, World!")],
[eg.Button("Exit")]]
# create a window
window = eg.Window("test", layout)
# event loop
while True:
event, values = window.read()
if event in ["Exit", eg.WINDOW_CLOSED]:
eg.popup("Thank you.")
break
# close window
window.close()
Samples
We have prepared a selection of samples to demonstrate simple usage. Please check them out.
Running tests/file_viewer.py
allows all samples to be easily launched.
Documents
Below is a detailed list of classes and methods.
About the relationship with PySimpleGUI
- When utilizing basic features, it is compatible with PySimpleGUI. You can write programs using the same event model as PySimpleGUI.
- The names of basic GUI components are also kept the same. However, while some property names differ, many unique features have been implemented.
- This project was developed with PySimpleGUI in mind, but has been implemented entirely from scratch. There are no licensing issues.
- We are not considering full compatibility with PySimpleGUI.
TkEasyGUI features:
- Using a
for
loop andwindow.event_iter()
enables straightforward event processing. - Custom popup dialogs, such as a color selection dialog (
eg.popup_color
), are available. - The
Image
class 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.
Link
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for TkEasyGUI-0.2.55-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3d08b993f21e256065179285b827b114f5ffc43a5363ce6f415080d117029f3 |
|
MD5 | 869a1cf4e14e236226b77265112203b5 |
|
BLAKE2b-256 | 834930f1974bec0f8e1ef8adaff958884660bf7c41bd0e6f88d1f693c3137639 |