diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-07-23 23:18:03 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-07-23 23:18:03 -0400 |
commit | 8ed685e54d897b00666581a07f0b889588a28bb1 (patch) | |
tree | d7e1a8826d5c542353688e4e251afa1bbd4bcd79 /examples/unicode_commands.py | |
parent | 4ddd51ff18628a1b41f6656aab0a8da146bf91ae (diff) | |
download | cmd2-git-8ed685e54d897b00666581a07f0b889588a28bb1.tar.gz |
Fixed bad practice of using print() and replaced with self.poutput()
Diffstat (limited to 'examples/unicode_commands.py')
-rwxr-xr-x | examples/unicode_commands.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/unicode_commands.py b/examples/unicode_commands.py index a0b556a1..24c3a917 100755 --- a/examples/unicode_commands.py +++ b/examples/unicode_commands.py @@ -11,15 +11,15 @@ class UnicodeApp(cmd2.Cmd): def __init__(self): super().__init__() - self.intro = 'Welcome to MyApp. Note the full Unicode support: 😇 💩' + self.intro = 'Welcome the Unicode example app. Note the full Unicode support: 😇 💩' - def do_𝛑print(self, arg): + def do_𝛑print(self, _): """This command prints 𝛑 to 5 decimal places.""" - print("𝛑 = {0:.6}".format(math.pi)) + self.poutput("𝛑 = {0:.6}".format(math.pi)) def do_你好(self, arg): - """This comamnd says hello in Chinese (Mandarin).""" - print("你好 " + arg) + """This command says hello in Chinese (Mandarin).""" + self.poutput("你好 " + arg) if __name__ == '__main__': |