def fromEnvironment(cls):
        """
        Get as many of the platform-specific error translation objects as
        possible and return an instance of C{cls} created with them.
        """
        try:
            from ctypes import WinError
        except ImportError:
            WinError = None
        try:
            from win32api import FormatMessage
        except ImportError:
            FormatMessage = None
        try:
            from socket import errorTab
        except __HOLE__:
            errorTab = None
        return cls(WinError, FormatMessage, errorTab)
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/python/win32.py/_ErrorFormatter.fromEnvironment