Lightweight package for colored text in python.
Project description
Usage
Usage | Params | Return Value |
---|---|---|
ansiprint() |
str: msg, str: color-name/ansi, str: end, boolean: flush |
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.7.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for AnsiPrint-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c777d23d583664e41f848802bcae7196fb6286d952e7f28a9fcc0074983ca32d |
|
MD5 | 633cfda9123d20f536f3e5d84472d1cb |
|
BLAKE2b-256 | 16052aad6e0f8128a31fb88ea97d132a5ad77f7f60f0d9c09e650f5beb629cfd |