summaryrefslogtreecommitdiff
path: root/src/lxml/ElementInclude.py
diff options
context:
space:
mode:
authorscoder <none@none>2008-06-19 18:36:50 +0200
committerscoder <none@none>2008-06-19 18:36:50 +0200
commit7c987435b7743abfe586413407a9571488a49f86 (patch)
treedc757fcea544baaf247eb0c95ff8a48be2a17286 /src/lxml/ElementInclude.py
parentbb2ec5ab52a61bc0032ff76223c9f5fb6e0dfbac (diff)
downloadpython-lxml-7c987435b7743abfe586413407a9571488a49f86.tar.gz
[svn r3831] r4511@delle: sbehnel | 2008-06-19 10:46:05 +0200
fixes for Py3k stdlib restructuring --HG-- branch : trunk
Diffstat (limited to 'src/lxml/ElementInclude.py')
-rw-r--r--src/lxml/ElementInclude.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lxml/ElementInclude.py b/src/lxml/ElementInclude.py
index 471893fa..a0224bb3 100644
--- a/src/lxml/ElementInclude.py
+++ b/src/lxml/ElementInclude.py
@@ -52,12 +52,18 @@ form of custom URL resolvers.
from lxml import etree
import copy
-from urlparse import urljoin
-from urllib2 import urlopen
+try:
+ from urlparse import urljoin
+ from urllib2 import urlopen
+except ImportError:
+ # Python 3
+ from urllib.parse import urljoin
+ from urllib.request import urlopen
try:
set
except NameError:
+ # Python 2.3
from sets import Set as set
XINCLUDE = "{http://www.w3.org/2001/XInclude}"