Skip to main content

Write simple UI for your code in seconds in a unified way using Easy TTUI Menus

Project description

Easy TTUI Menus

About

Write simple UI for your code in seconds in a unified way using Easy TTUI Menus

Installation

Run pip3 install easyttuimenus from your preferred environment.

Usage

List Menu

list_menu(prompt: str, options: list)

Use when you have a list of possible valid options.

Parameters

prompt: Information to give to the user

opitons: The list of options to select

Returns

An index from options

Example Usage

import easyttuimenus
prompt = "Pick one of these"
options = ["lorem", "ipsum", "lorem ipsum"]
choice = easyttuimenus.list_menu(prompt, options)
print(options[choice]) # selected item from options

Int Menu

Use when you want to take an integer value as input.

Parameters

prompt: Information to give to the user

opitons: A list containing a minimum and maximum value

Returns

An integer value

Example Usage

import easyttuimenus
min_and_max = [0, 10]
prompt = "Pick a value between 0 and 10"
user_input = easyttuimenus.int_menu(prompt, min_and_max)
print(user_input) # user selected number

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

easyttuimenus-0.1.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

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

easyttuimenus-0.1.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file easyttuimenus-0.1.0.tar.gz.

File metadata

  • Download URL: easyttuimenus-0.1.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for easyttuimenus-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b159268b32dba7fd58e2e48c05c609b5d2a1cf524165e88a1b045de4bf394551
MD5 2e3129f040ee72cde5bbfccc5fb4f6c4
BLAKE2b-256 355f2f938fe7f756c6e638fc39744d889c7bd5374194671c92e8489c1b53b756

See more details on using hashes here.

File details

Details for the file easyttuimenus-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: easyttuimenus-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for easyttuimenus-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e42f35f05ad1e4e782a795acf713154c52f8a2596b77e698570928f767a2aab
MD5 b2ac94c3f3bddb65f2350538a42964e7
BLAKE2b-256 5e6c417cb6a410bf3d13059a2bd37a351a42695cd58ac92dbe8023aa11408af1

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