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.5.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for AnsiPrint-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b04b960be353c3f7ebbf57a6b4e6c9857ac4f81878302361c43734136962540 |
|
MD5 | c9a20d99e4a20a1482a42c92df99188f |
|
BLAKE2b-256 | 04b94b00d96d9f453aa2a420111c7bb538152cc89a3b31f24a2e1f812e04f953 |