From: W. Trevor King Date: Thu, 7 Feb 2013 21:11:41 +0000 (-0500) Subject: ui.cli: Unwrap multiline answers in display_result X-Git-Tag: v0.2~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=da7ccde95a00c9eac955729961c592149ae50193;p=quizzer.git ui.cli: Unwrap multiline answers in display_result No need to surprise the user with the internal list representation. --- diff --git a/quizzer/ui/cli.py b/quizzer/ui/cli.py index 4663077..94255a2 100644 --- 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):