diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-07-23 23:14:14 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-07-23 23:14:14 -0400 |
commit | 4ddd51ff18628a1b41f6656aab0a8da146bf91ae (patch) | |
tree | e096c6742eabb23c8ba3d07a98e24b6a84b0d115 /examples/unicode_commands.py | |
parent | ed3a1db1866b19c75f313c667f2481a41e753605 (diff) | |
download | cmd2-git-4ddd51ff18628a1b41f6656aab0a8da146bf91ae.tar.gz |
Added another command to the unicode command name example
Diffstat (limited to 'examples/unicode_commands.py')
-rwxr-xr-x | examples/unicode_commands.py | 4 |
1 files changed, 4 insertions, 0 deletions
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() |