Skip to main content

A lightweight POSIX terminal I/O library

Project description

ltermio - A Lightweight POSIX terminal I/O library

The package contains four modules: cursor, termkey, color256 and unicon. Tested only on MacOS terminal and iTerm2, so the platform compatibility has not been well verfied yet. All functions are based on CSI sequences and termios, no additional requirements other than the standard library.

Installation

Uses pip to install the package:

pip3 install ltermio

cursor

Wrapper functions of CSI(Control Sequence Introducer) sequences about cursor and screen. And additionally provides a several of functions for text composing.

termkey

There are two functions getch() and getkey() for reading keyboard in non-canonical mode. getch() reads raw key characters byte by byte, getkey() calls getch() and transforms the CSI sequences of function keys into key codes that defined in an enumerate class Key.

color256

Sets 256-color display attributes of the character terminal.

unicon

Collection of some common icons in unicode character set.

History & Why

When I was learning Python a few months ago, I decided to write a terminal Tetris game as a practice of the language learning. Due to the learning reason, I did not want to use any third-party packages. So when I finally finished the game, there naturally formed a by-product, I named it ltermio.

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

ltermio-0.1.6.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

ltermio-0.1.6-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file ltermio-0.1.6.tar.gz.

File metadata

  • Download URL: ltermio-0.1.6.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for ltermio-0.1.6.tar.gz
Algorithm Hash digest
SHA256 fd3ee535c69d1e0886c93d2da4d08e26c8113d7d1cd4d755036aa8e17a51c4f7
MD5 ac37f364560c6e08cf8be56084d62bda
BLAKE2b-256 96220801253b92914d12576d6b39df0eb57c08d0a7f6028d6e4334bfc36e97a4

See more details on using hashes here.

File details

Details for the file ltermio-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: ltermio-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for ltermio-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c3f359e476e345f9014c354005c15288bb7b4b15197ca0ea5cbb93ea48a7c884
MD5 7e10b9d3696221c53c937fc45a757dfb
BLAKE2b-256 834ba14890dcb5617675c07df1a38e1c81b92f35a26f10f6300ac60c5cc0588e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page