summaryrefslogtreecommitdiff
path: root/python/mllib
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-05-13 19:16:15 +0000
committerRafael H. Schloming <rhs@apache.org>2008-05-13 19:16:15 +0000
commit6df0526d0777fa4ab7d94b01bce87b6199085d51 (patch)
tree6faab7b8bc5d2164054057d5fe48aac09c70fef8 /python/mllib
parentd499b75a390cbb6a30206f384dd460e642ab7552 (diff)
downloadqpid-python-6df0526d0777fa4ab7d94b01bce87b6199085d51.tar.gz
QPID-954: added fallbacks and fixes for running the python client on python 2.3
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@655976 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/mllib')
-rw-r--r--python/mllib/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/mllib/__init__.py b/python/mllib/__init__.py
index 44b78126fb..81165f6999 100644
--- a/python/mllib/__init__.py
+++ b/python/mllib/__init__.py
@@ -22,7 +22,7 @@ This module provides document parsing and transformation utilities for
both SGML and XML.
"""
-import dom, transforms, parsers
+import os, dom, transforms, parsers
import xml.sax, types
from cStringIO import StringIO
@@ -49,7 +49,9 @@ def sgml_parse(source):
p.close()
return p.parser.tree
-def xml_parse(source):
+def xml_parse(filename):
+ # XXX: this is for older versions of python
+ source = "file://%s" % os.path.abspath(filename)
p = parsers.XMLParser()
xml.sax.parse(source, p)
return p.parser.tree