Use proper py3k syntax for relative import (from . import foo)

This commit is contained in:
Alex Martelli 2006-08-21 20:54:38 +00:00
parent fe25e236ed
commit c5c45ba30f
2 changed files with 3 additions and 2 deletions

View file

@ -49,7 +49,7 @@
## ##
import copy import copy
import ElementTree from . import ElementTree
XINCLUDE = "{http://www.w3.org/2001/XInclude}" XINCLUDE = "{http://www.w3.org/2001/XInclude}"

View file

@ -133,9 +133,10 @@ class _SimpleElementPath:
return result return result
try: try:
import ElementPath from . import ElementPath
except ImportError: except ImportError:
# FIXME: issue warning in this case? # FIXME: issue warning in this case?
# TODO: DEFINITELY issue warning here!!!
ElementPath = _SimpleElementPath() ElementPath = _SimpleElementPath()
# TODO: add support for custom namespace resolvers/default namespaces # TODO: add support for custom namespace resolvers/default namespaces