A Python library for creating Terminal User Interfaces using curses
Reason this release was yanked:
outdated
Project description
number selector
from tuilib import tui
def main(stdscr):
num:int = tui.number_selector(stdscr,0,0,10) #starts at 0, minimum 0, maximum 10
tui.func_exit(stdscr)
print(num)
tui.main(main)
list selector
from tuilib import tui
def main(stdscr):
options = ["banana","grape","cherry","apple"]
choice = tui.list_selector(stdscr,options)
tui.func_exit(stdscr)
print("you chose",choice)
tui.main(main)
real time input
ok I fixed it anyway
from tuilib import tui
def main(stdscr):
name:str = tui.real_time_input(stdscr,"what is your name?: ")
tui.func_exit(stdscr)
print("hello",name)
tui.main(main)
country selector
from tuilib import tui
def main(stdscr) -> str:
stdscr.addstr("pick a country: ")
stdscr.refresh()
stdscr.getch()
country = tui.country_selector(stdscr)
return country
stdscr functions
same as the curses library
to install:
pip install tuilib
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
tuilib-2.0.1.0.tar.gz
(3.6 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
File details
Details for the file tuilib-2.0.1.0.tar.gz.
File metadata
- Download URL: tuilib-2.0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d18a4a4b3a13897e8dc55ec8fc74de84937fa374b7b53a0efe3b04d7668c6968
|
|
| MD5 |
badedebee047091f467525915875f8b3
|
|
| BLAKE2b-256 |
0114136626a880f46272cfc0b75734c2927f7126f3cf60c315c86f53bbf82421
|
File details
Details for the file tuilib-2.0.1.0-py3-none-any.whl.
File metadata
- Download URL: tuilib-2.0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34ee71a8b7b98158071712968f230287f11a16387b006db0d80194bb337e0d50
|
|
| MD5 |
d24f4916d40ea893e84af7d8289b724c
|
|
| BLAKE2b-256 |
991efa02e35a66463414cb0f636c81026bc7f3acdce7268859c950b33a4f46d8
|