summaryrefslogtreecommitdiff
path: root/examples/greetingInGreek.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/greetingInGreek.py')
-rw-r--r--examples/greetingInGreek.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/greetingInGreek.py b/examples/greetingInGreek.py
index c4d002f..921ac04 100644
--- a/examples/greetingInGreek.py
+++ b/examples/greetingInGreek.py
@@ -6,15 +6,15 @@
#
# Copyright 2004-2016, by Paul McGuire
#
-from pyparsing import Word
+from pyparsing import Word, pyparsing_unicode
# define grammar
-alphas = ''.join(chr(x) for x in range(0x386, 0x3ce))
+alphas = pyparsing_unicode.Greek.alphas
greet = Word(alphas) + ',' + Word(alphas) + '!'
# input string
-hello = "Καλημέρα, κόσμε!".decode('utf-8')
+hello = "Καλημέρα, κόσμε!"
# parse input string
-print(greet.parseString( hello ))
+print(greet.parseString(hello))