You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
473 B
Python
15 lines
473 B
Python
6 years ago
|
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)
|