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.6.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for AnsiPrint-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dba455e68e41853e246fe6a0deaf80404f07d0a4f17106624eed17e9fcd8ff98 |
|
MD5 | a7803dbf18abe510debaa02d9e004bc8 |
|
BLAKE2b-256 | fcedf1c1a6c30150a0e6c66b033c066e9885f89f48ffe2e4ca0c7f3a316717ad |