diff options
author | Jared Crapo <jared@kotfu.net> | 2017-08-21 21:44:35 -0600 |
---|---|---|
committer | Jared Crapo <jared@kotfu.net> | 2017-08-21 21:44:35 -0600 |
commit | 886ff04fb841db140799de4c9ad683adf5093384 (patch) | |
tree | 37148667d6acc302593cfbb29335bf5fbc9feda1 /tests/test_transcript.py | |
parent | 6f14013a26d2c394d77f6da0682a68947d6dbb05 (diff) | |
download | cmd2-git-886ff04fb841db140799de4c9ad683adf5093384.tar.gz |
Updates to CmdLineApp()
Diffstat (limited to 'tests/test_transcript.py')
-rw-r--r-- | tests/test_transcript.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py index 12d539ea..320ad1b6 100644 --- a/tests/test_transcript.py +++ b/tests/test_transcript.py @@ -54,15 +54,15 @@ class CmdLineApp(Cmd): """Repeats what you tell me to.""" arg = ''.join(arg) if opts.piglatin: - arg = '%s%say' % (arg[1:].rstrip(), arg[0]) + arg = '%s%say' % (arg[1:], arg[0]) if opts.shout: arg = arg.upper() repetitions = opts.repeat or 1 for i in range(min(repetitions, self.maxrepeats)): - self.stdout.write(arg) - self.stdout.write('\n') - # self.stdout.write is better than "print", because Cmd can be - # initialized with a non-standard output destination + self.poutput(arg) + # recommend using the poutput function instead of + # self.stdout.write or "print", because Cmd allows the user + # to redirect output do_say = do_speak # now "say" is a synonym for "speak" do_orate = do_speak # another synonym, but this one takes multi-line input |