Skip to main content

PyPI Python package PyPI - License

cusser 🤬

cusser

A curses wrapper that understands ANSI escape code sequences

cusser is a lightweight Python package for teaching curses how to use ANSI escape code sequences. It works by wrapping the curses standard window object and intercepting escape code sequences.

Features

Installation

$ pip install cusser

Usage

In [1]: import curses

In [2]: from cusser import Cusser

In [3]: def app(stdscr) -> None:
   ...:     """Start a new application."""
   ...:     if not isinstance(stdscr, Cusser):
   ...:         stdscr = Cusser(stdscr)
   ...:
   ...:     ultra_violet = (100, 83, 148)
   ...:     x, y = 34, 12
   ...:     stdscr.addstr(
   ...:         f"\033[2J\033[{x};{y}H"
   ...:         "\033[1;32mHello "
   ...:         f"\033[;3;38;2;{';'.join(map(str, ultra_violet))}m"
   ...:         "cusser"
   ...:         "\033[m 🤬!"
   ...:     )
   ...:     stdscr.refresh()
   ...:     stdscr.getch()
   ...:

In [4]: curses.wrapper(app)

Screenshot

Credits

Photo by Gwendal Cottin on Unsplash.

Metadata

Release files for cusser 0.1.1

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

Source distribution (sdist)

Source distribution for cusser 0.1.1
File Size Uploaded Provenance Actions
cusser-0.1.1.tar.gz 7.9 kB Without provenance Details for cusser-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cusser 0.1.1
File Interpreter ABI Platform Actions
cusser-0.1.1-py3-none-any.whl Python 3 none any Details for cusser-0.1.1-py3-none-any.whl

Total release size: 16.2 kB

Release files / cusser-0.1.1.tar.gz

Download URL cusser-0.1.1.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8347ab009eaf6125a7d0622715bb9e19f32087cedd526c03502cf5a6cf1d6bde
BLAKE2b-256 checksum
How to use checksums
9a6f8992e5700c02184a6091ad1965026162ce96a56d0c3c4c20641d4a8d8475
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.7 Linux/5.13.0-22-generic

Release files / cusser-0.1.1-py3-none-any.whl

Download URL cusser-0.1.1-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9cdd2b94a4b1e01a62df89470a34d04226fd8a9b4b7f14dabe4f9450aeddf950
BLAKE2b-256 checksum
How to use checksums
c5d6ec13e32a9ee7ba1c50890baaefecb7df44e508b410b8101637bd6a3ff31f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.7 Linux/5.13.0-22-generic

Security for cusser 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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