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 or termios, no additional requirements other than the standard library.
Installation
Uses pip to install the package:
pip3 install ltermio
cursor
A series of functions about screen and cursor operations. And additionally provides 4 interesting functions for text composing, where v_composing() supports using VI like cursor commands to layout text display.
termkey
There are 5 curses like functions: getch(), getkey(), ungetch(), ungetkey(), setparams().
getch() and getkey() read keyboard in non-canonical mode, ungetch() and ungetkey() put keys back to the key buffer for next reading, setparams() sets frequently-used input attributes.
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 this by-product, I named it ltermio.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ltermio-0.3.5.tar.gz
.
File metadata
- Download URL: ltermio-0.3.5.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ad4a8e53b6089da85d4ef8e4246d710573e0de1fc67c093221418b172acf783 |
|
MD5 | e0dd016ff50961b3bc10399ab18833d4 |
|
BLAKE2b-256 | 415c8387cde63c7b170fe7d304b30d50e7ccbf4310f92ac413873a132ed01a49 |
File details
Details for the file ltermio-0.3.5-py3-none-any.whl
.
File metadata
- Download URL: ltermio-0.3.5-py3-none-any.whl
- Upload date:
- Size: 21.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 741ca6efb6607a49571d1ce90a9e39900218e9835ee4264a103d108eb390d876 |
|
MD5 | 0cd82839408bdefb609ff3f8a1d2820d |
|
BLAKE2b-256 | 750f93abb897ae035122ad14b53c0fcb655930fbb89fe6031dc791d0876afe81 |