Overview
PySimpleGUI is a Python library aimed at making it easier to create custom user interfaces. It offers a single interface that works with several different Python GUI framework backends like tkinter, Qt, WxPython, and Remi.
Key features
- Unified interface for multiple GUI backends
- Easy and quick to create GUIs
- Rich widget support
- Cross-platform compatibility
- Active community and support
Common use cases
- Automating daily tasks with GUI scripts
- Rapid prototyping of GUI applications
- Simple desktop applications
- GUI for scripts and command-line tools
- Educational tools and hobby projects
Installation
pip install PySimpleGUI
Example
import PySimpleGUI as sg
layout = [[sg.Text("Hello from PySimpleGUI")], [sg.Button("OK")]]
window = sg.Window("Demo", layout)
while True:
event, values = window.read()
if event == sg.WINDOW_CLOSED or event == "OK":
break
window.close()