projects
/
quizzer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf10c01
)
ui.cli: Unwrap multiline answers in display_result
author
W. Trevor King
<wking@tremily.us>
Thu, 7 Feb 2013 21:11:41 +0000
(16:11 -0500)
committer
W. Trevor King
<wking@tremily.us>
Thu, 7 Feb 2013 21:11:41 +0000
(16:11 -0500)
No need to surprise the user with the internal list representation.
quizzer/ui/cli.py
patch
|
blob
|
history
diff --git
a/quizzer/ui/cli.py
b/quizzer/ui/cli.py
index 4663077a29fbec2c6be81532707e2a4dc969aafd..94255a2f5e1df843f95aca7974d4119f0fa4e8cf 100644
(file)
--- a/
quizzer/ui/cli.py
+++ b/
quizzer/ui/cli.py
@@
-159,7
+159,10
@@
class CommandLineInterface (UserInterface):
else:
correct = 'incorrect'
correct = _colorize(self.colors[correct], correct)
- print(' you answered: {}'.format(answer['answer']))
+ ans = answer['answer']
+ if question.multiline:
+ ans = '\n '.join(ans)
+ print(' you answered: {}'.format(ans))
print(' which was: {}'.format(correct))
def display_totals(self):