Created
February 12, 2016 17:12
-
-
Save timotree3/328734ea252af84f83db to your computer and use it in GitHub Desktop.
Display ANSI formatting
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
print('\033[1;37m This is normal') | |
print("") | |
for attr in range(0,8): | |
for fg in range(30,38): | |
print('') | |
print('\033[1;37m default ',end="") | |
for bg in range(40,48): | |
print('\033['+ str(attr) +';'+ str(bg) +';'+ str(fg) +'m ' \ | |
+str(attr)+';'+str(fg)+';'+str(bg)+'\033[m ',end="") | |
print("") | |
print('\033[1;37m This is back to normal') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment