summaryrefslogtreecommitdiff
path: root/examples/unicode_commands.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2019-07-23 23:14:14 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2019-07-23 23:14:14 -0400
commit4ddd51ff18628a1b41f6656aab0a8da146bf91ae (patch)
treee096c6742eabb23c8ba3d07a98e24b6a84b0d115 /examples/unicode_commands.py
parented3a1db1866b19c75f313c667f2481a41e753605 (diff)
downloadcmd2-git-4ddd51ff18628a1b41f6656aab0a8da146bf91ae.tar.gz
Added another command to the unicode command name example
Diffstat (limited to 'examples/unicode_commands.py')
-rwxr-xr-xexamples/unicode_commands.py4
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()