Python implementation of Terminal Markup Language
Project description
tmlpy - Python implementation of Terminal Markup Language
A Python module to implement tml, which make the output of coloured/formatted text in the terminal easier and more readable.
Usage in Python
First, install tmlpy:
pip install tmlpy
The output of coloured/formatted text is easy using the following syntax:
from tmlpy import tml
tml.print("<red>this text is <bold>red</bold></red> ", "and the following is <green>%s</green>" % "not red", sep='')
Format
Each tag is enclosed in angle brackets, much like HTML.
You can nest tags as deeply as you like.
It's not required to close tags you've opened, though it can make for easier reading.
Available Tags
Foreground Colours
<red><green><yellow><blue><magenta><cyan><lightgrey><darkgrey><black><white><lightred><lightgreen><lightyellow><lightblue><lightmagenta><lightcyan>
Background Colours
<bg-red><bg-green><bg-yellow><bg-blue><bg-magenta><bg-cyan><bg-lightgrey><bg-darkgrey><bg-black><bg-white><bg-lightred><bg-lightgreen><bg-lightyellow><bg-lightblue><bg-lightmagenta><bg-lightcyan>
Attributes
<bold><dim><underline><blink><reverse><hidden>
Related
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tmlpy-0.1.0.tar.gz.
File metadata
- Download URL: tmlpy-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8620e7c98401f27772311dd5d341f14923076156260bed9612c8b19ef474f5db
|
|
| MD5 |
74b3671fd419ab228f0cb5f381fe6a62
|
|
| BLAKE2b-256 |
3ac0e91e0d7a9cf29807fd2875ae173b082d0593f9d7978f1a94300825ea26eb
|
File details
Details for the file tmlpy-0.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: tmlpy-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c1a97d744452267e7c596a509cd60e460fe8f5670800f784efeb14bbb68ede6
|
|
| MD5 |
3ad745e6f16c1179b3d4fe15778070a0
|
|
| BLAKE2b-256 |
ea28e4da970f1d4b60853c60225b1aa27b2b6b448940a2ac5861e339f4a7e580
|