Skip to main content

Command-line gui library for python

Project description

clgui

Command-Line-GUI

Docs

Install clgui

pip install clgui

Create new gui

import clgui

vertical_layout = clgui.Layouts.VStack() # Currently the only layout is VStack, more are planned
main = clgui.GUI(layout=vertical_layout) # Initialize a new GUI

# Elements
button_list = clgui.ButtonList() # Currently the only element types are ButtonList and Button, more are planned
button = clgui.Button("click me") # Buttons do not need event handlers but can have them.

def handleClick(data):
	print(data)
# Methods
button1 = clgui.Button("Hello", handleClick, ["data1", "data2"]) # Create a new button with an event handler when enter is pressed on it
button2 = clgui.Button("World", lambda: print("World"), "extra data") # Create a new button with an event handler when enter is pressed on it
button_list.addButtons([button1, button2]) # Add buttons to the button list

button_list.addButton(button1) # A single button can also be added

vertical_layout.add(button_list) # Add button list to the layout
vertical_layout.add(button) # You can also directly add a button to the layout
main.show() # Show the main GUI
main.destroy() # Close the gui

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

clgui-0.0.5.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

clgui-0.0.5-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file clgui-0.0.5.tar.gz.

File metadata

  • Download URL: clgui-0.0.5.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for clgui-0.0.5.tar.gz
Algorithm Hash digest
SHA256 cc394f2e1d1da1151822a9674ac33c0eba48e164ac3a0b212a70ac0d397db4fc
MD5 53aa11815766f312dcb2a3e2712a9287
BLAKE2b-256 337e96a89779759eed8d8cd62471f996fc01b8f8b0320ac271dc76068328b991

See more details on using hashes here.

File details

Details for the file clgui-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: clgui-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for clgui-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9e5935ff6bd7c1c310fad74072773f76b24430434c4a112d3e49adba2a064293
MD5 ce53abde4a421578ed98d5d0dc64f234
BLAKE2b-256 864a52f09c43dd029fff53d3ad81810b3b9de0e31357df2df7d05683e741ac36

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