mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +01:00
Fixes to expect, some to the way it wraps, etc.
This commit is contained in:
parent
eadc1bc3d7
commit
757f1aa927
@ -38,9 +38,11 @@ def expect(prompt, possibilities, recursed=False):
|
|||||||
print 'Sorry, that response was not an option.'
|
print 'Sorry, that response was not an option.'
|
||||||
if possibilities:
|
if possibilities:
|
||||||
prompt = '%s [%s]' % (originalPrompt, '/'.join(possibilities))
|
prompt = '%s [%s]' % (originalPrompt, '/'.join(possibilities))
|
||||||
if len(prompt) > 70:
|
if len(prompt) > 70:
|
||||||
prompt = '%s [%s]' % (originalPrompt, '/ '.join(possibilities))
|
prompt = '%s [%s]' % (originalPrompt, '/ '.join(possibilities))
|
||||||
prompt = textwrap.fill(prompt, subsequent_indent=indent)
|
prompt = textwrap.fill(prompt, subsequent_indent=indent)
|
||||||
|
else:
|
||||||
|
prompt = textwrap.fill(prompt)
|
||||||
prompt = prompt.replace('/ ', '/')
|
prompt = prompt.replace('/ ', '/')
|
||||||
prompt = prompt.strip() + ' '
|
prompt = prompt.strip() + ' '
|
||||||
s = raw_input(prompt)
|
s = raw_input(prompt)
|
||||||
|
Loading…
Reference in New Issue
Block a user