diff options
Diffstat (limited to 'other/python_external.py')
-rwxr-xr-x | other/python_external.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/other/python_external.py b/other/python_external.py index 7c5ab0c..2926c67 100755 --- a/other/python_external.py +++ b/other/python_external.py @@ -3,7 +3,8 @@ Author: Christian Heimes """ -import sys +from __future__ import print_function + from xml.sax import ContentHandler from xml.sax import parseString @@ -41,7 +42,7 @@ class WeatherHandler(ContentHandler): def characters(self, content): if self.tag == "processing": - self.city.append(content) + self.city.append(content) def weatherResponse(xml): @@ -52,6 +53,7 @@ def weatherResponse(xml): else: return "<error>Unknown city %s</error>" % handler.city[:500] + for xml in (xml_good, xml_bad_file, xml_bad_url): print("\nREQUEST:\n--------") print(xml) |