summaryrefslogtreecommitdiff
path: root/examples/unicode_commands.py
diff options
context:
space:
mode:
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()