Skip to content

Commit bf5edb3

Browse files
committed
mini-capstone
1 parent 12e7dab commit bf5edb3

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

code/jonpan/capstone.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from random import randint
2+
from asciimatics.screen import Screen
3+
4+
def demo(screen):
5+
while True:
6+
screen.print_at(text,
7+
randint(0, screen.width), randint(0, screen.height),
8+
colour=randint(0, screen.colours - 1),
9+
bg=randint(0, screen.colours - 1))
10+
ev = screen.get_key()
11+
if ev in (ord('Q'), ord('q')):
12+
return
13+
screen.refresh()
14+
15+
text = input("Enter a string: ")
16+
17+
Screen.wrapper(demo)

0 commit comments

Comments
 (0)