Created
May 6, 2018 16:38
-
-
Save dougpuob/7e496a971827a2bad9092214c736b551 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from random import randint | |
from asciimatics.screen import Screen | |
def demo(screen): | |
while True: | |
screen.print_at('Hello world!', | |
randint(0, screen.width), randint(0, screen.height), | |
colour=randint(0, screen.colours - 1), | |
bg=randint(0, screen.colours - 1)) | |
ev = screen.get_key() | |
if ev in (ord('Q'), ord('q')): | |
return | |
screen.refresh() | |
Screen.wrapper(demo) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment