mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
Added something(prompt).
This commit is contained in:
parent
822a12535b
commit
2047dd76b6
@ -47,6 +47,13 @@ def expect(prompt, possibilities, recursed=False):
|
||||
def anything(prompt):
|
||||
return expect(prompt, [])
|
||||
|
||||
def something(prompt):
|
||||
s = expect(prompt, [])
|
||||
while not s:
|
||||
print 'Sorry, you must enter a value.'
|
||||
s = expect(prompt, [])
|
||||
return s
|
||||
|
||||
def yn(prompt):
|
||||
return expect(prompt, ['y', 'n'])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user