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)`

Constructor: `Platform(name, platform)`

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: `Optional[str]` = None, platform: `Optional[str]` = None): (source)

Undocumented

def getType(self) -> `Optional[str]`: (source)

Get platform type.

Returns
`Optional[str]` | Either 'posix', 'win32' or 'java'

def isDocker(self, _initCGroupLocation: `str` = '/proc/1/cgroup') -> `bool`: (source)

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

Returns
`bool` | `True` if the current platform has been detected as Linux inside a Docker container.

def isKnown(self) -> `bool`: (source)

Do we know about this platform?

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

def isLinux(self) -> `bool`: (source)

Check if current platform is Linux.

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

def isMacOSX(self) -> `bool`: (source)

Check if current platform is macOS.

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

def isVista(self) -> `bool`: (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) -> `bool`: (source)

Are we running in Windows?

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

def isWinNT(self) -> `bool`: (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) -> `bool`: (source)

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

Present Since
10.1

def supportsThreads(self) -> `bool`: (source)

Can threads be created?

Returns
`bool` | `True` if the threads are supported on the current platform.

seconds = (source)

Undocumented

type: `Optional[str]` = (source)

Undocumented

def _supportsSymlinks(self) -> `bool`: (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