1
0
mirror of https://github.com/Mikaela/Limnoria.git synced 2025-04-09 09:28:12 +02:00

Added something(prompt).

This commit is contained in:
Jeremy Fincher 2003-04-08 07:22:40 +00:00
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'])