-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtermio_demo.py
More file actions
23 lines (23 loc) · 745 Bytes
/
Copy pathtermio_demo.py
File metadata and controls
23 lines (23 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from termio import cls as cls
from termio import printat as printat
from termio import rect as rect
from termio import fillrect as fillrect
import time
# clear screen
cls()
# set cursor at x=5 and y=4 (from top left of screen) and write TEST
printat(5,4,"TEST")
time.sleep(1)
# Draw a rectangle from x=2, y=2 with 10 chars wide and 5 lines down no specified char for line
rect(2,2,10,5,"")
# Draw a filled rectangle from 15,10 with 20 char wide and 6 lines down lines are made with # and filled with _
time.sleep(3)
cls()
fillrect(5,5,10,5,"#","_")
# Draw a filled rectangke with no char specified for line and filled with .
fillrect(6,6,8,3,"",".")
# set cursor at start of line 17 and show End
printat(0,17,"End")
print()
time.sleep(10)
cls()