This class holds information about the operating system, the toolkit and the basic architecture bitness of the machine where the application is currently running.
This class does not only have getters for the information above, it also has setters. This allows you to e.g. save the current platform information in a data file (maybe in string form) so that when you later load it, you can easily retrieve (see the static getters for string.enum conversion functions) and store inside a PlatformInfo instance (using its setters) the signature of the system which generated it.
In general however you only need to use the static Get
function and then access the various information for the current platform:
wx.LogMessage("This application is running under %s." % wx.PlatformInformation.Get().GetOperatingSystemIdName())
See also
wx.GetOsVersion
, wx.IsPlatformLittleEndian
, wx.IsPlatform64Bit
, wx.AppTraits, Network, User and OS
Initializes the instance with the values corresponding to the currently running platform. |
|
Returns |
|
Returns |
|
Returns the global PlatformInfo object, initialized with the values for the currently running platform. |
|
Returns the architecture bitness |
|
Returns the name for the architecture bitness of this PlatformInfo instance. |
|
Returns the |
|
Returns the desktop environment associated with this PlatformInfo instance. |
|
Returns the endianness |
|
Returns the name for the endianness of this PlatformInfo instance. |
|
Returns the Linux distribution info associated with this PlatformInfo instance. |
|
Returns the native |
|
Returns the run-time major version of the OS associated with this PlatformInfo instance. |
|
Returns the run-time micro version of the OS associated with this PlatformInfo instance. |
|
Returns the run-time minor version of the OS associated with this PlatformInfo instance. |
|
Returns the description of the operating system of this PlatformInfo instance. |
|
Returns the operating system directory. |
|
Returns the operating system family name of the OS associated with this PlatformInfo instance. |
|
Returns the operating system |
|
Returns the operating system name of the OS associated with this PlatformInfo instance. |
|
Returns the wxWidgets port |
|
Returns the name of the wxWidgets port |
|
Returns the short name of the wxWidgets port |
|
Returns the run-time major version of the toolkit associated with this PlatformInfo instance. |
|
Returns the run-time micro version of the toolkit associated with this PlatformInfo instance. |
|
Returns the run-time minor version of the toolkit associated with this PlatformInfo instance. |
|
Returns |
|
Returns |
|
Sets the architecture bitness enum value associated with this PlatformInfo instance. |
|
Sets the desktop environment associated with this PlatformInfo instance. |
|
Sets the endianness enum value associated with this PlatformInfo instance. |
|
Sets the linux distribution info associated with this PlatformInfo instance. |
|
Sets the version of the operating system associated with this PlatformInfo instance. |
|
Sets the operating system description associated with this PlatformInfo instance. |
|
Sets the operating system associated with this PlatformInfo instance. |
|
Sets the wxWidgets port |
|
Sets the version of the toolkit associated with this PlatformInfo instance. |
|
Inequality operator. |
|
Equality operator. |
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
PlatformInfo() . None PlatformInfo(pid : PortId, tkMajor: int=-1, tkMinor: int=-1, id: OperatingSystemId=OS_UNKNOWN, osMajor: int=-1, osMinor: int=-1, bitness: Bitness=BITNESS_INVALID, endian: Endianness=ENDIAN_INVALID) . None
This class holds information about the operating system, the toolkit and the basic architecture bitness of the machine where the application is currently running.
__init__ (self)
Initializes the instance with the values corresponding to the currently running platform.
This is a fast operation because it only requires to copy the values internally cached for the currently running platform.
None
See also
__init__ (self, pid : PortId, tkMajor: int=-1, tkMinor: int=-1, id: OperatingSystemId=OS_UNKNOWN, osMajor: int=-1, osMinor: int=-1, bitness: Bitness=BITNESS_INVALID, endian: Endianness=ENDIAN_INVALID)
Initializes the object using given values.
pid (PortId)
tkMajor (int)
tkMinor (int)
id (OperatingSystemId)
osMajor (int)
osMinor (int)
bitness (Bitness)
endian (Endianness)
None
Returns True
if the OS version is at least major.minor.micro
.
major (int)
minor (int)
micro (int)
bool
See also
GetOSMajorVersion
, GetOSMinorVersion
, GetOSMicroVersion
, CheckToolkitVersion
Returns True
if the toolkit version is at least major.minor.micro
.
major (int)
minor (int)
micro (int)
bool
Returns the global PlatformInfo object, initialized with the values for the currently running platform.
PlatformInfo
arch (string)
Deprecated
Use GetBitness
instead.
str
Deprecated
Use GetBitnessName
instead.
Deprecated
Use GetBitness
instead.
Returns the architecture bitness ID
of this PlatformInfo instance.
Added in version 4.1/wxWidgets-3.1.5.
GetBitnessName (self)
Returns the name for the architecture bitness of this PlatformInfo instance.
str
Added in version 4.1/wxWidgets-3.1.5.
GetBitnessName (bitness : Bitness)
Returns the name for the given Bitness enumeration value.
bitness (Bitness)
str
Added in version 4.1/wxWidgets-3.1.5.
Returns the CPU
architecture name, if available.
str
Added in version 4.1/wxWidgets-3.1.5.
Returns the desktop environment associated with this PlatformInfo instance.
See wx.AppTraits.GetDesktopEnvironment
for more info.
str
Returns the endianness ID
of this PlatformInfo instance.
Returns the name for the endianness of this PlatformInfo instance.
str
Returns the Linux distribution info associated with this PlatformInfo instance.
See wx.GetLinuxDistributionInfo for more info.
Returns the native CPU
architecture name, if available.
str
Added in version 4.1/wxWidgets-3.1.6.
Returns the run-time major version of the OS associated with this PlatformInfo instance.
int
See also
Returns the run-time micro version of the OS associated with this PlatformInfo instance.
int
Added in version 4.1/wxWidgets-3.1.1.
See also
Returns the run-time minor version of the OS associated with this PlatformInfo instance.
int
See also
Returns the description of the operating system of this PlatformInfo instance.
See wx.GetOsDescription
for more info.
str
Returns the operating system directory.
See GetOSDirectory
for more info.
str
Returns the operating system family name of the OS associated with this PlatformInfo instance.
str
Returns the operating system ID
of this PlatformInfo instance.
See wx.GetOsVersion
for more info.
Returns the operating system name of the OS associated with this PlatformInfo instance.
str
Returns the wxWidgets port ID
associated with this PlatformInfo instance.
Returns the name of the wxWidgets port ID
associated with this PlatformInfo instance.
str
Returns the short name of the wxWidgets port ID
associated with this PlatformInfo instance.
str
Returns the run-time major version of the toolkit associated with this PlatformInfo instance.
Note that if GetPortId
returns PORT_BASE
, then this value is zero (unless externally modified with SetToolkitVersion
); that is, no native toolkit is in use. See wx.AppTraits.GetToolkitVersion
for more info.
int
See also
Returns the run-time micro version of the toolkit associated with this PlatformInfo instance.
Note that if GetPortId
returns PORT_BASE
, then this value is zero (unless externally modified with SetToolkitVersion
); that is, no native toolkit is in use. See wx.AppTraits.GetToolkitVersion
for more info.
int
Added in version 4.1/wxWidgets-3.1.1.
See also
Returns the run-time minor version of the toolkit associated with this PlatformInfo instance.
Note that if GetPortId
returns PORT_BASE
, then this value is zero (unless externally modified with SetToolkitVersion
); that is, no native toolkit is in use. See wx.AppTraits.GetToolkitVersion
for more info.
int
See also
Returns True
if this instance is fully initialized with valid values.
bool
Returns True
if this PlatformInfo describes wxUniversal build.
bool
n (Architecture)
None
Deprecated
Use SetBitness
instead.
Sets the architecture bitness enum value associated with this PlatformInfo instance.
n (Bitness)
None
Added in version 4.1/wxWidgets-3.1.5.
Sets the desktop environment associated with this PlatformInfo instance.
de (string)
None
Sets the endianness enum value associated with this PlatformInfo instance.
n (Endianness)
None
Sets the linux distribution info associated with this PlatformInfo instance.
None
Sets the version of the operating system associated with this PlatformInfo instance.
major (int)
minor (int)
micro (int)
None
Sets the operating system description associated with this PlatformInfo instance.
desc (string)
None
Sets the operating system associated with this PlatformInfo instance.
None
Sets the wxWidgets port ID
associated with this PlatformInfo instance.
n (PortId)
None
Sets the version of the toolkit associated with this PlatformInfo instance.
major (int)
minor (int)
micro (int)
None
Inequality operator.
Tests all class’ internal variables.
t (PlatformInfo)
Equality operator.
Tests all class’ internal variables.
t (PlatformInfo)
See GetArchName
See GetArchitecture
and SetArchitecture
See GetBitness
and SetBitness
See GetBitnessName
See GetEndianness
and SetEndianness
See GetOperatingSystemDescription
and SetOperatingSystemDescription
See GetPortIdName