summaryrefslogtreecommitdiffstats
path: root/Lib/xml
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2009-06-22 19:33:48 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2009-06-22 19:33:48 (GMT)
commite71bd81a890cea830681880bc5d7298dd98d71ce (patch)
treee5436f5d733009b71d785aa8b27badbbf3a61685 /Lib/xml
parentd9920c255d4a88a70ff9bcfc21f273f5e42fff4e (diff)
downloadcpython-e71bd81a890cea830681880bc5d7298dd98d71ce.zip
cpython-e71bd81a890cea830681880bc5d7298dd98d71ce.tar.gz
cpython-e71bd81a890cea830681880bc5d7298dd98d71ce.tar.bz2
#4490 Fix sample code run by "python -m xml.sax.xmlreader"
Diffstat (limited to 'Lib/xml')
-rw-r--r--Lib/xml/sax/expatreader.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/xml/sax/expatreader.py b/Lib/xml/sax/expatreader.py
index e6d1902..92a79c1 100644
--- a/Lib/xml/sax/expatreader.py
+++ b/Lib/xml/sax/expatreader.py
@@ -407,8 +407,8 @@ def create_parser(*args, **kwargs):
# ---
if __name__ == "__main__":
- import xml.sax
+ import xml.sax.saxutils
p = create_parser()
- p.setContentHandler(xml.sax.XMLGenerator())
+ p.setContentHandler(xml.sax.saxutils.XMLGenerator())
p.setErrorHandler(xml.sax.ErrorHandler())
- p.parse("../../../hamlet.xml")
+ p.parse("http://www.ibiblio.org/xml/examples/shakespeare/hamlet.xml")