Socket
Socket
Sign inDemoInstall

simgui

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simgui

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


Maintainers
1

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc