forked from webbshasta/pfb2019_VisuallyImpaired
-
Notifications
You must be signed in to change notification settings - Fork 0
/
print_wizard.py
49 lines (31 loc) · 928 Bytes
/
print_wizard.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env python3
dic = {
'\\' : b'\xe2\x95\x9a',
'-' : b'\xe2\x95\x90',
'/' : b'\xe2\x95\x9d',
'|' : b'\xe2\x95\x91',
'+' : b'\xe2\x95\x94',
'%' : b'\xe2\x95\x97',
}
def decode(x):
return (''.join(dic.get(i, i.encode('utf-8')).decode('utf-8') for i in x))
def input1(text):
print(decode('+-------------%' + '+---------------%'))
print(decode('| A) MUSHROOM |' + '| B) CHERRY PIE |'))
print(decode('\\-------------/' + '\\---------------/'))
answer = input('>>>')
return(answer)
def input2(text):
print('What was that? Try again!')
print(decode('+-----%' + '+----%'))
print(decode('| A) |' + '| B) |'))
print(decode('\\-----/' + '\\----/'))
answer = input('>>>')
return(answer)
def input3(text):
print('Yes or No?')
print(decode('+-----%' + '+----%'))
print(decode('| Yes |' + '| No |'))
print(decode('\\-----/' + '\\----/'))
answer = input('>>>')
return(answer)