Created
June 17, 2017 00:13
-
-
Save Kalimaha/e0ea8eab822bfca30ff36ab5bcfd51ca to your computer and use it in GitHub Desktop.
Print to terminal in colours w/ Python
This file contains hidden or 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
| print('\033[95m' + '[ ] - ' + s.state + '\033[0m') | |
| print('\033[92m' + '[✓] - ' + s.state + '\033[0m') | |
| print('\033[93m' + '[!] - ' + s.state + '\033[0m') | |
| print('\033[91m' + '=======================\033[0m') | |
| print('\033[91m' + '[x] - ' + s.state + '\033[0m') | |
| print('\033[91m' + '-----------------------\033[0m') | |
| print('\033[91m' + 'Expected:\n\n ' + str({'spam': 'eggs'}) + '\n\nActual:\n\n ' + str({'eggs': 'bacon'}) + '\033[0m') | |
| print('\033[91m' + '=======================\033[0m') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment