Platform (sfi.Platform)

class sfi.Platform

This class provides a set of utilities for getting platform information.

Method Summary

isLinux() Determine if the platform is Linux.
isMac() Determine if the platform is Mac OS.
isSolaris() Determine if the platform is Solaris.
isUnix() Determine if the platform is Unix or Linux.
isWindows([version]) Determine if the platform is Windows and the version number is greater than or equal to the version specified.

Method Detail

static isLinux()

Determine if the platform is Linux.

Returns:True if the platform is Linux.
Return type:bool
static isMac()

Determine if the platform is Mac OS.

Returns:True if the platform is Mac OS.
Return type:bool
static isSolaris()

Determine if the platform is Solaris.

Returns:True if the platform is Solaris.
Return type:bool
static isUnix()

Determine if the platform is Unix or Linux.

Returns:True if the platform is Unix or Linux.
Return type:bool
static isWindows(version=None)

Determine if the platform is Windows and the version number is greater than or equal to the version specified.

Parameters:version (float, optional) – The Windows version to verify. Version numbers correspond to internal Microsoft versions, such as 5.1, 6.0, 6.1, 6.2, 6.3, and 10.0.
Returns:True if the platform is Windows and the version is not less than specified.
Return type:bool