From 4ddd51ff18628a1b41f6656aab0a8da146bf91ae Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Tue, 23 Jul 2019 23:14:14 -0400 Subject: Added another command to the unicode command name example --- examples/unicode_commands.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'examples/unicode_commands.py') diff --git a/examples/unicode_commands.py b/examples/unicode_commands.py index 9aa31c69..a0b556a1 100755 --- a/examples/unicode_commands.py +++ b/examples/unicode_commands.py @@ -17,6 +17,10 @@ class UnicodeApp(cmd2.Cmd): """This command prints 𝛑 to 5 decimal places.""" print("𝛑 = {0:.6}".format(math.pi)) + def do_你好(self, arg): + """This comamnd says hello in Chinese (Mandarin).""" + print("你好 " + arg) + if __name__ == '__main__': app = UnicodeApp() -- cgit v1.2.1