Skip to main content

A simple GUI API (wrapper around PySide6) for Python learners to build simple yet interesting event driven apps.

Project description

simgui

A simple GUI API (wrapper around PySide6) for Python learners to build simple yet interesting event driven apps.

a sample GUI app

It provides the following features:

  • Create labels, buttons, input fields and comboboxes.
  • Respond to events such as button clicks and input text changes.
  • Place such widgets on a grid layout easily.
  • All is done using simple function calls (no need to understand classes and objects).

With these a Python learner can make GUI apps like: pacman, spade invaders, etc.

How to use

Here is a sample GUI program.

from simgui import *

def on_ready():
    add_label("l1", "Name")
    add_input("i1", right=True)
    add_label("l2", "Job Title")
    add_input("i2", right=True)
    add_combo("cb1", cols=2)
    add_combo_item("cb1", "chicken")
    add_combo_item("cb1", "beef")
    add_combo_item("cb1", "beans")
    add_button("b1", "OK")
    add_button("b2", "Cancel", right=True)

def on_click_b1():
    set_label_text("l2", 333)

def on_edited_i1():
    set_input_text("i2", get_input_value("i1")+1)

def on_index_changed_cb1():
    print(get_combo_text("cb1")+" is selected")

start()  # must do this to kick start the app with the UI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simgui-1.5.2.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simgui-1.5.2-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file simgui-1.5.2.tar.gz.

File metadata

  • Download URL: simgui-1.5.2.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for simgui-1.5.2.tar.gz
Algorithm Hash digest
SHA256 aa7b91ae265338a76795cf7c74f22db2c9f363da6815ea363c81a9046cd0e076
MD5 709ce80606ca5c2d5359095c2246107d
BLAKE2b-256 5f316b48d610b68e0ec66006c454ee95ea7f93508ccf1de4b2755a2393e8b177

See more details on using hashes here.

File details

Details for the file simgui-1.5.2-py3-none-any.whl.

File metadata

  • Download URL: simgui-1.5.2-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for simgui-1.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8f9ed3679a72177cfb0fbde7a6f99540ef5c479286fa2059337a639d25e7fb7f
MD5 1640b7f31c47179116b34b251143dc2f
BLAKE2b-256 48ca5bd512f3de2eebae75ebbc85dc2ffbb9c927c3046193be1f86c56a72572b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page