AnsI/O module for ansi input & output
Project description
AnsI/O
AnsI/O module for ansi input & output
Example usage
Ansi input
from ansio import ansi_input, application_keypad, mouse_input
from ansio.input import InputEvent, get_input_event
with ansi_input, application_keypad, mouse_input:
while True:
event: InputEvent = get_input_event()
print(event.pressed, repr(event.shortcut))
Example output:
True 'alt+shift+a'
True 'ctrl+a'
True 'tab'
True 'shift+up'
True 'a'
True 'primary_click'
False 'primary_click'
True 'ctrl+primary_click'
False 'ctrl+primary_click'
Ansi output
from ansio import ansi_output
from ansio.colors import blue_bg, invert, italic, yellow
with ansi_output:
print(f'Print in {yellow(blue_bg("color"))} and with {italic(invert("styles"))}')
Example output:
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
ansio-0.0.2.tar.gz
(27.8 kB
view details)
Built Distribution
ansio-0.0.2-py3-none-any.whl
(21.2 kB
view details)
File details
Details for the file ansio-0.0.2.tar.gz
.
File metadata
- Download URL: ansio-0.0.2.tar.gz
- Upload date:
- Size: 27.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eba3d1f324a7861a02a85e814917fd4dca38f3b29d1a04e9292fa933afd8a218 |
|
MD5 | 213dc187fdd39701740b7c6bf61d09b6 |
|
BLAKE2b-256 | 511d2d585d8f12384da76b308272471f812e2df63dc3127d0140f9e60f40e6a3 |
File details
Details for the file ansio-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: ansio-0.0.2-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d79a75e9910c4acaa23747c9e83816e6b941993f51390f774a41c064d8aa3fff |
|
MD5 | efba8ee99c8bb9bab725a4b505ea47e5 |
|
BLAKE2b-256 | b85d4e4091a66928c8d246832e5b5c4347f8f6090e95c942712da2c156021974 |