Skip to content

Instantly share code, notes, and snippets.

@robhardwick
Created June 20, 2018 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robhardwick/104c967237fd94ee3e8cb9f8b5e0b90f to your computer and use it in GitHub Desktop.
Save robhardwick/104c967237fd94ee3e8cb9f8b5e0b90f to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import time
import curses
def main(stdscr):
MESSAGE = 'TROLE '
INTERVAL = 0.1
start = time.time()
while True:
stdscr.clear()
num = int((curses.COLS - 1) / len(MESSAGE))
for x in range(curses.LINES - 1):
MESSAGE = MESSAGE[1:] + MESSAGE[0]
stdscr.addstr(x, 0, MESSAGE * num)
stdscr.refresh()
time.sleep(INTERVAL - ((time.time() - start) % INTERVAL))
curses.wrapper(main)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment