Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`python`.`runtime`.`Platform``

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:`str` | Undocumented
Returns
`bool` | `True` if the current platform has been detected as Linux inside a Docker container.

def isKnown(self): (source)

Do we know about this platform?

Returns
`bool` | Boolean indicating whether this is a known platform or not.

def isLinux(self): (source)

Check if current platform is Linux.

Returns
`bool` | `True` if the current platform has been detected as Linux.

def isMacOSX(self): (source)

Check if current platform is macOS.

Returns
`bool` | `True` 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
`bool` | `True` if the current platform has been detected as Vista

def isWindows(self): (source)

Are we running in Windows?

Returns
`bool` | `True` 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
`bool` | `True` 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
`bool` | Undocumented
Present Since
10.1

def supportsThreads(self): (source)

Can threads be created?

Returns
`bool` | `True` 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
`bool` | `True` if symlinks are supported on the current platform, otherwise `False`.

_platform = (source)

Undocumented