Skip to content

Instantly share code, notes, and snippets.

@MayankFawkes
Created February 18, 2020 19:56
Show Gist options
  • Select an option

  • Save MayankFawkes/913050738406c2d859c2b555123efa28 to your computer and use it in GitHub Desktop.

Select an option

Save MayankFawkes/913050738406c2d859c2b555123efa28 to your computer and use it in GitHub Desktop.
import time
import random
import ctypes
import platform
if platform.system() == 'Windows':
kernel32 = ctypes.windll.kernel32
kernel32.SetConsoleMode(kernel32.GetStdHandle(-11), 7)
col=[30,31,32,33,34,35,36,37,38,39,90,91,92,93,94,95,96,97]
while True:
print('\033[{}m{}\033[0m'.format(random.choice(col),time.ctime()),end="\r")
time.sleep(0.3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment