diff options
Diffstat (limited to 'src/examples/mozillaCalendarParser.py')
-rw-r--r-- | src/examples/mozillaCalendarParser.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/examples/mozillaCalendarParser.py b/src/examples/mozillaCalendarParser.py index 15929a6..2805c95 100644 --- a/src/examples/mozillaCalendarParser.py +++ b/src/examples/mozillaCalendarParser.py @@ -1,4 +1,3 @@ -# -*- coding: UTF-8 -*-
from pyparsing import Optional, oneOf, Dict, Literal, Word, printables, Group, OneOrMore, ZeroOrMore """ @@ -17,7 +16,7 @@ License: Free for any use BEGIN = Literal("BEGIN:").suppress() END = Literal("END:").suppress() -str = printables + "äöåÖÄÅ" +str = printables + "\xe4\xf6\xe5\xd6\xc4\xc5" valstr = str + " " EQ = Literal("=").suppress() @@ -71,7 +70,7 @@ calendars = OneOrMore(calendar) def gotEvent(s,loc,toks): for event in toks: - print event['summary'], "from", event["begin"], "to", event["end"] + print (event['summary'], "from", event["begin"], "to", event["end"]) event.setParseAction(gotEvent) |