class documentation

class Platform: (source)

View In Hierarchy

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

Undocumented

Parameters
name:Optional[str]Undocumented
platform:Optional[str]Undocumented
def getType(self): (source)
Get platform type.
Returns
Optional[str]Either 'posix', 'win32' or 'java'
def isDocker(self, _initCGroupLocation='/proc/1/cgroup'): (source)
Check if the current platform is Linux in a Docker container.
Parameters
_initCGroupLocation:strUndocumented
Returns
boolTrue if the current platform has been detected as Linux inside a Docker container.
def isKnown(self): (source)
Do we know about this platform?
Returns
boolBoolean indicating whether this is a known platform or not.
def isLinux(self): (source)
Check if current platform is Linux.
Returns
boolTrue if the current platform has been detected as Linux.
def isMacOSX(self): (source)
Check if current platform is macOS.
Returns
boolTrue if the current platform has been detected as macOS.
def isVista(self): (source)
Check if current platform is Windows Vista or Windows Server 2008.
Returns
boolTrue if the current platform has been detected as Vista
def isWindows(self): (source)
Are we running in Windows?
Returns
boolTrue if the current platform has been detected as Windows.
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.

Returns
boolTrue if the current platform has been detected as Windows NT.
def supportsINotify(self): (source)
Return True if we can use the inotify API on this platform.
Returns
boolUndocumented
Present Since
10.1
def supportsThreads(self): (source)
Can threads be created?
Returns
boolTrue if the threads are supported on the current platform.
seconds = (source)

Undocumented

type = (source)

Undocumented

def _supportsSymlinks(self): (source)
Check for symlink support usable for Twisted's purposes.
Returns
boolTrue if symlinks are supported on the current platform, otherwise False.
_platform = (source)

Undocumented