You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

__init__.py 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. """Core XML support for Python.
  2. This package contains three sub-packages:
  3. dom -- The W3C Document Object Model. This supports DOM Level 1 +
  4. Namespaces.
  5. parsers -- Python wrappers for XML parsers (currently only supports Expat).
  6. sax -- The Simple API for XML, developed by XML-Dev, led by David
  7. Megginson and ported to Python by Lars Marius Garshol. This
  8. supports the SAX 2 API.
  9. """
  10. __all__ = ["dom", "parsers", "sax"]
  11. # When being checked-out without options, this has the form
  12. # "<dollar>Revision: x.y </dollar>"
  13. # When exported using -kv, it is "x.y".
  14. __version__ = "$Revision: 1.11 $".split()[-2:][0]
  15. _MINIMUM_XMLPLUS_VERSION = (0, 6, 1)
  16. try:
  17. import _xmlplus
  18. except ImportError:
  19. pass
  20. else:
  21. try:
  22. v = _xmlplus.version_info
  23. except AttributeError:
  24. # _xmlplue is too old; ignore it
  25. pass
  26. else:
  27. if v >= _MINIMUM_XMLPLUS_VERSION:
  28. import sys
  29. sys.modules[__name__] = _xmlplus
  30. else:
  31. del v