Created
June 20, 2018 15:19
-
-
Save robhardwick/104c967237fd94ee3e8cb9f8b5e0b90f to your computer and use it in GitHub Desktop.
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
#!/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