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.
# Methods
button1 = clgui.Button("Hello", lambda: print("Hello")) # Create a new button with an event handler when enter is pressed on it
button2 = clgui.Button("World", lambda: print("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.4.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.4-py3-none-any.whl
(14.4 kB
view details)
File details
Details for the file clgui-0.0.4.tar.gz.
File metadata
- Download URL: clgui-0.0.4.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 |
77d8aaf401ecd270f17951bcf068a00827e7a0e0b89e983288c893ff5ce3fc66
|
|
| MD5 |
9b0149d3c330982f906bd25b639445bb
|
|
| BLAKE2b-256 |
3af92e95990f1a2aca28924c408f774fa3fbbdc1784ef838d485979ffab5fe63
|
File details
Details for the file clgui-0.0.4-py3-none-any.whl.
File metadata
- Download URL: clgui-0.0.4-py3-none-any.whl
- Upload date:
- Size: 14.4 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 |
cf69919757de175a0c615c1ebbefd39a6a08f564eecbe4e5f334cc3dcb857db5
|
|
| MD5 |
75cb5eb2e5762bd0c7bc1f204f5513df
|
|
| BLAKE2b-256 |
1ff2f400dbced6c616ab329956318203a5c1e86a554aa68713691008ad823320
|