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.8.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.8-py3-none-any.whl
(15.0 kB
view details)
File details
Details for the file clgui-0.0.8.tar.gz.
File metadata
- Download URL: clgui-0.0.8.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 |
c529dadffe30b381907c35589030a58175a75cfa30a3d93b46329114b22aa8c5
|
|
| MD5 |
61828594a7732876ce001e67c89cd954
|
|
| BLAKE2b-256 |
e0b4765c08f2a40afc655f5be044058b1b3fd765b3307a3286d762f1fbf0ff23
|
File details
Details for the file clgui-0.0.8-py3-none-any.whl.
File metadata
- Download URL: clgui-0.0.8-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 |
ee97ba1498a16cd1fa9f0b964199dd2b72f183a5ab0ff59226b33850a39269d0
|
|
| MD5 |
9a2524616da1b049b1bf39c05e51db50
|
|
| BLAKE2b-256 |
48a85855d330278d5ed6d9777bc2a164b886ad00ada01db241f3320860da86c9
|