Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / lib / python2.7 / dist-packages / twisted / | server ip : 104.21.89.46 your ip : 172.69.214.189 H O M E |
Filename | /usr/lib/python2.7/dist-packages/twisted/__init__.py |
Size | 1.8 kb |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 09:56 |
Last modified | 20-Dec-2012 22:18 |
Last accessed | 06-Jul-2025 10:47 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
# -*- test-case-name: twisted -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Twisted: The Framework Of Your Internet.
"""
def _checkRequirements():
# Don't allow the user to run a version of Python we don't support.
import sys
version = getattr(sys, "version_info", (0,))
if version < (2, 6):
raise ImportError("Twisted requires Python 2.6 or later.")
if version < (3, 0):
required = "3.6.0"
else:
required = "4.0.0"
if ("setuptools" in sys.modules and
getattr(sys.modules["setuptools"],
"_TWISTED_NO_CHECK_REQUIREMENTS", None) is not None):
# Skip requirement checks, setuptools ought to take care of installing
# the dependencies.
return
# Don't allow the user to run with a version of zope.interface we don't
# support.
required = "Twisted requires zope.interface %s or later" % (required,)
try:
from zope import interface
except ImportError:
# It isn't installed.
raise ImportError(required + ": no module named zope.interface.")
except:
# It is installed but not compatible with this version of Python.
raise ImportError(required + ".")
try:
# Try using the API that we need, which only works right with
# zope.interface 3.6 (or 4.0 on Python 3)
class IDummy(interface.Interface):
pass
@interface.implementer(IDummy)
class Dummy(object):
pass
except TypeError:
# It is installed but not compatible with this version of Python.
raise ImportError(required + ".")
_checkRequirements()
# Ensure compat gets imported
from twisted.python import compat
# setup version
from twisted._version import version
__version__ = version.short()
del compat
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Twisted: The Framework Of Your Internet.
"""
def _checkRequirements():
# Don't allow the user to run a version of Python we don't support.
import sys
version = getattr(sys, "version_info", (0,))
if version < (2, 6):
raise ImportError("Twisted requires Python 2.6 or later.")
if version < (3, 0):
required = "3.6.0"
else:
required = "4.0.0"
if ("setuptools" in sys.modules and
getattr(sys.modules["setuptools"],
"_TWISTED_NO_CHECK_REQUIREMENTS", None) is not None):
# Skip requirement checks, setuptools ought to take care of installing
# the dependencies.
return
# Don't allow the user to run with a version of zope.interface we don't
# support.
required = "Twisted requires zope.interface %s or later" % (required,)
try:
from zope import interface
except ImportError:
# It isn't installed.
raise ImportError(required + ": no module named zope.interface.")
except:
# It is installed but not compatible with this version of Python.
raise ImportError(required + ".")
try:
# Try using the API that we need, which only works right with
# zope.interface 3.6 (or 4.0 on Python 3)
class IDummy(interface.Interface):
pass
@interface.implementer(IDummy)
class Dummy(object):
pass
except TypeError:
# It is installed but not compatible with this version of Python.
raise ImportError(required + ".")
_checkRequirements()
# Ensure compat gets imported
from twisted.python import compat
# setup version
from twisted._version import version
__version__ = version.short()
del compat