Skip to main content

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


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.2.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

tuilib-2.0.2.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file tuilib-2.0.2.0.tar.gz.

File metadata

  • Download URL: tuilib-2.0.2.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for tuilib-2.0.2.0.tar.gz
Algorithm Hash digest
SHA256 0b8041d4405df1419dea6951688c1a1f59a7f4885e9332aed2f9a7b37507eda4
MD5 72d97e51288e8da066c67ea13ab9989c
BLAKE2b-256 37c5b7336d5432b6c4ae11e0c5fa5200ccfeda6005023eac85e7125d38e1b974

See more details on using hashes here.

File details

Details for the file tuilib-2.0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tuilib-2.0.2.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

Hashes for tuilib-2.0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8dd16bc2d8a1411c1766ad956864f22fb9505bd06b93e83be00f91c46a96b3d
MD5 ce5e6604434e72d96964d09e253fa337
BLAKE2b-256 fd7ba68a9633e9529f627c7035ef13555340cedfb4f47c5aeee040caf2ea7357

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