TermIO
Simple library that makes it easier to manipulate the terminal using escape sequences.
It does not work in all terminal and terminal-emulators. But i have generally had good with bash.
import TermIO
func TermIO.TermSize.Rows(Update=True)
Returns rows in terminal as an int.
Update : BOOL, should you check the terminal size again, or just [True]
assume that it hasn't changed since last check.
func TermIO.TermSize.Columns(Update=True)
Returns Columns in terminal as an int.
Update : BOOL, should you check the terminal size again, or just [True]
assume that it hasn't changed since last check.
func TermIO.Cursor.SetPos(col, row, flush=True)
Set cursor to a spesific column and row in the terminal.
col : The column number to put the cursor.
row : The row number to put the cursor.
flush : Wether or not to flush the codes printed (Default is true).
func TermIO.Cursor.Left(n, flush=True)
Move the cursor n characters to the left.
n : number
flush : Wether or not to flush the codes printed (Default is true).
func TermIO.Cursor.Right(n, flush=True)
Move the cursor n characters to the right.
n : number
flush : Wether or not to flush the codes printed (Default is true).
func TermIO.Cursor.Up(n, flush=True)
Move the cursor n characters up.
n : number
flush : Wether or not to flush the codes printed (Default is true).
func TermIO.Cursor.Down(n, flush=True)
Move the cursor n characters to the down.
n : number
flush : Wether or not to flush the codes printed (Default is true).
func TermIO.Screen.Clear(flush=True)
Clear the screen.
flush : Wether or not to flush the codes printed (Default is true).
func TermIO.Screen.Flush()
Flushes printed content to screen.
func TermIO.Screen.Decorate(fg=None, bg=None, dec=None, flush=True)
Clear the screen
fg : Number between 0 and 255. No logical color math... [None]
bg : Number between 0 and 255. No logical color math... [None]
dec : Either a string or a list of strings. [None]
The three possible decorations is
reversed, underline, bold
eg:
TermIO.Screen.Decorate(dec="reversed")
or
TermIO.Screen.Decorate(dec=["bold", "reversed"])
flush : Wether or not to flush the codes printed. [True]
If you want to print ESC[0M, to remove all decorations. Just call this function with fg=bg=dec=None.
func TermIO.Screen.Write(outStr, flush=True)
Writes a string to stdout.
outStr : string to be printed
flush : Wether or not to flush the codes printed (Default is true).
Metadata
Release files for TermIO 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| TermIO-0.1.6.tar.gz | 2.9 kB | Without provenance | Details for TermIO-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| TermIO-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for TermIO-0.1.6-py3-none-any.whl |
Total release size: 19.8 kB
Release files / TermIO-0.1.6.tar.gz
| Download URL | TermIO-0.1.6.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fbfacde7440c920074a9bd5f5e4bd799c88c920883f54524ff4247ebda79afc
|
|
BLAKE2b-256 checksum How to use checksums |
5b2c1ddb6b319133714be6ba72cd9ad5e3a0703bf74013c0664a9741c6bbf62a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4
|
Release files / TermIO-0.1.6-py3-none-any.whl
| Download URL | TermIO-0.1.6-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
315a924b9676af59f213c5555cb42da57928743221fcd56a6de3abdc3aa15b6b
|
|
BLAKE2b-256 checksum How to use checksums |
8f2b1c61885b5b50ec82d61baa3ae62ae0c959a40627637a65c09be5928fee11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4
|
Security for TermIO 0.1.6
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.