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.3.0.tar.gz (3.6 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.3.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for tuilib-2.0.3.0.tar.gz
Algorithm Hash digest
SHA256 d898acc9009e69c23bc12681279fb4c8f88d448fd4262767263eb746edf858e9
MD5 b71cb416d16da853134b21660f0ae807
BLAKE2b-256 63ce9ba93c1ac5f31a3a9ac028e4f5ce0642c9695d9fb70328a4437602b290f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tuilib-2.0.3.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c34d27028647ae9c6ce91bfd904a328aa8ec6576f6ba76b5247365c8ed96bce
MD5 ae3fc524e85ec628c0711c7d34f5189f
BLAKE2b-256 11c2b1041837caf67b13135fda1d8345881a54fb459561452af7ecb90e908b26

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