Skip to content

Instantly share code, notes, and snippets.

@blackphreak
Last active July 8, 2018 11:15
Show Gist options
  • Select an option

  • Save blackphreak/3cf156a0f8dc87872587b97253fb1bb2 to your computer and use it in GitHub Desktop.

Select an option

Save blackphreak/3cf156a0f8dc87872587b97253fb1bb2 to your computer and use it in GitHub Desktop.
a python program that for testing ColoredOutput
#!/usr/bin/python
from cout import cout
from time import sleep
def testOut(i, lv):
cout.log(lv, "Testing :D " + str(i))
if __name__ == '__main__':
arr = [cout.INFO, cout.WARN, cout.CRIT, cout.ERR, cout.NOR]
name = ["INFO", "WARN", "CRIT", "ERR_", "TEST"]
# 0 to 15
for y in range(16):
cout.LOG_LEVEL = y
for x in range(5):
print("----- %s -----" % (str("[ Printing {0} Log WITH LOG_LEVEL = {1}]".format(name[x], y))))
for i in range(3):
testOut(i, arr[x])
cout.log(cout.NONE, cout.msg(cout.bblue, "Testing " + cout.msg(cout.byellow, 'A :D ')))
progress = cout("Testing ProgressBar", 2000)
for i in range(2001):
progress.progress(i)
sleep(0.001)
raw_input("Press ENTER to exit....")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment