Created
October 3, 2024 13:25
-
-
Save TheBigRoomXXL/09878e8112c56d865c54f552b61b9013 to your computer and use it in GitHub Desktop.
Simple colorfull print in python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class c: | |
"""Terminal espcape sequences for colors""" | |
OK = "\033[92m" | |
WARN = "\033[93m" | |
END = "\033[0m" | |
# Examples | |
print(c.OK, "This is a success message", c.END) | |
print(c.WARN, "This is a warning", c.END) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment