Fixes to expect, some to the way it wraps, etc.

This commit is contained in:
Jeremy Fincher 2003-09-25 07:15:10 +00:00
parent eadc1bc3d7
commit 757f1aa927

View File

@ -41,6 +41,8 @@ def expect(prompt, possibilities, recursed=False):
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)