Skip to main content

Goals

A collection of curses utils for performing simple UI tasks. Currently this includes a simple console and a menu with vi-like bindings.

Installation

Requires python 3.

pip3 install curses-util should do the trick, or else python setup.py install from source.

Usage

SimpleConsole

A simple console with a single line input window.

import curses_util

def handle_input(console, input):
    console.log("Got input: " + input) #Logs result to the output window.

console = curses_used.SimpleConsole(handle_input)
console.log("Welcome")

Menu

This can be used to vend a collection of items which the user may then select one or more of. Navigation can be performed using standard vi bindings (count operands are also supported) or via the arrow keys. Multiple items can be selected with ‘multi_vend()’ if the user presses m over each of the items they wish to select and then presses enter.

import curses_util

menu = curses_util.Menu()

items = [ str(i) for i in range(100) ]
selected = menu.vend(items)

print("The following items were selected: \n")
print("\n".join(items), "\n")

Bugs, etc..

If you bother to read the code and invariably feel the need to abuse the person who wrote it, know that such sentiments will be happily received at r.vaiya@gmail.com.

Metadata

Release files for curses-util 0.0.25

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for curses-util 0.0.25
File Size Uploaded Provenance Actions
curses-util-0.0.25.tar.gz 6.5 kB Without provenance Details for curses-util-0.0.25.tar.gz

Release files / curses-util-0.0.25.tar.gz

Download URL curses-util-0.0.25.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5a5b4832121f716b963ce310536f2c172245a0678e820e87eb7fb01d4b368322
BLAKE2b-256 checksum
How to use checksums
14f42f52d68fa5df136fd68d72d6e9976789171dc0bf8752ee703a60ff419cca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Security for curses-util 0.0.25

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page