-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusers.py
41 lines (29 loc) · 801 Bytes
/
users.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
__author__ = 'haywire'
import re
from questions import Questions
stringRegexp = re.compile(r'\w+')
anythingRegexp = re.compile(r'.+')
def validateString(s):
return stringRegexp.match(s)
def validateAddress(s):
if len(s) > 10:
return anythingRegexp.match(s)
return None
class User():
# name = 'Honey'
# email = ''
# address = ''
basicQuestions = Questions(
[ 'What shall I call you honey? (Your sweet name please :)',
'What\'s your internet address? (Email Id!)',
'And where do you live on the earth? (Your address! Please type in one line only)'
],
[ validateString,
validateString,
validateString
],
[ 'Honey',
'',
''
]
)