__init__.py 662 B

123456789101112131415161718192021222324
  1. # -*- test-case-name: twisted -*-
  2. # Copyright (c) Twisted Matrix Laboratories.
  3. # See LICENSE for details.
  4. """
  5. Twisted: The Framework Of Your Internet.
  6. """
  7. def _checkRequirements():
  8. # Don't allow the user to run a version of Python we don't support.
  9. import sys
  10. version = getattr(sys, "version_info", (0,))
  11. if version < (2, 7):
  12. raise ImportError("Twisted requires Python 2.7 or later.")
  13. elif version >= (3, 0) and version < (3, 3):
  14. raise ImportError("Twisted on Python 3 requires Python 3.3 or later.")
  15. _checkRequirements()
  16. # setup version
  17. from twisted._version import __version__ as version
  18. __version__ = version.short()