PlatformInfo

class PlatformInfo(*args, **kwargs)

Informations about platform.

No constructor, only static methods are available.

Methods

GetCompilerId()

Accessor to the compiler id.

GetCompilerVersion()

Accessor to the compiler version.

GetDate()

Accessor to the build date.

GetFeatures()

Accessor to the features list.

GetInstallationDirectory()

Accessor to the install prefix.

GetNumericalPrecision()

Accessor to the output numerical precision.

GetRevision()

Accessor to the revision string.

GetVersion()

Accessor to the version string.

HasFeature(feature)

Test a feature's availability.

SetNumericalPrecision(precision)

Accessor to the output numerical precision.

__init__(*args, **kwargs)
static GetCompilerId()

Accessor to the compiler id.

Returns:
idstr

Compiler id (GNU, MSVC…).

static GetCompilerVersion()

Accessor to the compiler version.

Returns:
versionstr

Compiler version.

static GetDate()

Accessor to the build date.

Returns:
datestr

Build date.

static GetFeatures()

Accessor to the features list.

Returns:
featuresDescription

Features list.

Examples

>>> import openturns as ot
>>> print(ot.PlatformInfo.GetFeatures())
[bison,bonmin,...
static GetInstallationDirectory()

Accessor to the install prefix.

Returns:
prefixstr

Installation prefix.

static GetNumericalPrecision()

Accessor to the output numerical precision.

Returns:
precisionint

String output numerical precision.

static GetRevision()

Accessor to the revision string.

Returns:
revisionstr

Git revision.

static GetVersion()

Accessor to the version string.

Returns:
versionstr

Version string.

static HasFeature(feature)

Test a feature’s availability.

Parameters:
featurestr

The desired feature, often associated to a software dependency, Call GetFeatures() for the possible feature values.

Returns:
has_featurebool

Whether the designated feature is available.

Examples

>>> import openturns as ot
>>> have_xml_support = ot.PlatformInfo.HasFeature('libxml2')
static SetNumericalPrecision(precision)

Accessor to the output numerical precision.

Parameters:
precisionint

String output numerical precision.