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.layout.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") # 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
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
clgui-0.0.7.tar.gz
(8.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
clgui-0.0.7-py3-none-any.whl
(15.0 kB
view details)
File details
Details for the file clgui-0.0.7.tar.gz.
File metadata
- Download URL: clgui-0.0.7.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbf09c1d2bce703e0b6091f0b6991b75faee8b7c7609e3083ebb7c98a409c784
|
|
| MD5 |
302c6d687e905d63fc3fb1939ebe7a2c
|
|
| BLAKE2b-256 |
e2cd628a9e6a81241a789fe95af4fbcf55b3e5866d3608e36959228dd046d81d
|
File details
Details for the file clgui-0.0.7-py3-none-any.whl.
File metadata
- Download URL: clgui-0.0.7-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7961e8c048db20dc136cd1b641d115ee613b07f4beedbc677336b6823eff2b62
|
|
| MD5 |
e59c7250e87d3ebe886a7fadf8d72da4
|
|
| BLAKE2b-256 |
d9efb41e55e8419da66769cf2a51fdb01724c3762ca1c58153033ba6039ada84
|