Lightweight package for colored text in python.
Project description
Usage
Usage | Params | Return Value |
---|---|---|
ansiprint() |
str: msg, str: color-name/ansi, str: end |
str: msg |
ansi() |
str: color-name/ansi |
str: ansi |
clear() |
None: None |
None: None |
Examples
ansiprint()
Code:
ansiprint("This is red!","red")
ansiprint("This is blue!","blue")
ansiprint("This is white and ends with \"!\"",end="!")
Result:
ansi()
Code:
print(ansi("red") + "This is red!" + ansi("reset"))
print(ansi("blue") + "This is blue!" + ansi("reset"))
print(ansi(34) + "This is the ansi \"34\"!" + ansi("reset")) # ansi codes are in the ansi chart below
Result:
clear()
Code:
print("This message isn't seen because the console is cleared after!")
clear()
print("This message is seen because it is after the console is cleared!")
Result:
Ansi Chart
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
AnsiPrint-0.0.2.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for AnsiPrint-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12c2224f2fe3c57cc6711d16ad52bd0d46d68346719c0498302b7bf538738c9c |
|
MD5 | 5b3ae0344db88a567dcef96095266fc6 |
|
BLAKE2b-256 | 18320d1653a412f707186d54e138c5b34b7b572e889de1255d02e97d848b4724 |