class documentation

class twisted.python.runtime.Platform: (source)

View In Hierarchy

Gives us information about the platform we're running on.

Instance Variable type Undocumented
Instance Variable seconds Undocumented
Method __init__ Undocumented
Method isKnown Do we know about this platform?
Method getType Get platform type.
Method isMacOSX Check if current platform is macOS.
Method isWinNT Are we running in Windows NT?
Method isWindows Are we running in Windows?
Method isVista Check if current platform is Windows Vista or Windows Server 2008.
Method isLinux Check if current platform is Linux.
Method isDocker Check if the current platform is Linux in a Docker container.
Method supportsThreads Can threads be created?
Method supportsINotify Return True if we can use the inotify API on this platform.
Instance Variable _platform Undocumented
Method _supportsSymlinks Check for symlink support usable for Twisted's purposes.
type = (source)

Undocumented

seconds = (source)

Undocumented

def __init__(self, name=None, platform=None): (source)

Undocumented

ParametersnameUndocumented (type: Optional[str])
platformUndocumented (type: Optional[str])
_platform = (source)

Undocumented

def isKnown(self): (source)

Do we know about this platform?

ReturnsBoolean indicating whether this is a known platform or not. (type: bool)
def getType(self): (source)

Get platform type.

ReturnsEither 'posix', 'win32' or 'java' (type: Optional[str])
def isMacOSX(self): (source)

Check if current platform is macOS.

ReturnsTrue if the current platform has been detected as macOS. (type: bool)
def isWinNT(self): (source)

Are we running in Windows NT?

This is deprecated and always returns True on win32 because Twisted only supports Windows NT-derived platforms at this point.

ReturnsTrue if the current platform has been detected as Windows NT. (type: bool)
def isWindows(self): (source)

Are we running in Windows?

ReturnsTrue if the current platform has been detected as Windows. (type: bool)
def isVista(self): (source)

Check if current platform is Windows Vista or Windows Server 2008.

ReturnsTrue if the current platform has been detected as Vista (type: bool)
def isLinux(self): (source)

Check if current platform is Linux.

ReturnsTrue if the current platform has been detected as Linux. (type: bool)
def isDocker(self, _initCGroupLocation='/proc/1/cgroup'): (source)

Check if the current platform is Linux in a Docker container.

Parameters_initCGroupLocationUndocumented (type: str)
ReturnsTrue if the current platform has been detected as Linux inside a Docker container. (type: bool)
def _supportsSymlinks(self): (source)

Check for symlink support usable for Twisted's purposes.

ReturnsTrue if symlinks are supported on the current platform, otherwise False. (type: bool)
def supportsThreads(self): (source)

Can threads be created?

ReturnsTrue if the threads are supported on the current platform. (type: bool)
def supportsINotify(self): (source)

Return True if we can use the inotify API on this platform.

ReturnsUndocumented (type: bool)
Present Since10.1
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.