:py:mod:`platform` ================== .. py:module:: platform .. autoapi-nested-parse:: Platform information and detection. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: platform.Platform Attributes ~~~~~~~~~~ .. autoapisummary:: platform.KNOWLEDGE_BASE .. py:data:: KNOWLEDGE_BASE .. py:class:: Platform Bases: :py:obj:`NamedTuple` Class that allow user to retrieve os/cpu specific information. Attributes are: - cpu: CPU information - os: Operating System information - is_hie: whether the system is a high integrity system - platform: the platform name, e.g. arm-elf-linux - triplet: the GCC target - machine: machine name - domain: domain name - is_host: True if the instance represent information for the current machine - is_default: True if the platform is the default one .. py:attribute:: cpu :type: e3.os.platform.CPU .. py:attribute:: os :type: e3.os.platform.OS .. py:attribute:: is_hie :type: bool .. py:attribute:: platform :type: str .. py:attribute:: triplet :type: str .. py:attribute:: machine :type: str .. py:attribute:: domain :type: str .. py:attribute:: is_host :type: bool .. py:attribute:: is_default :type: bool .. py:attribute:: default_arch .. py:attribute:: system_info .. py:method:: get(platform_name: str | None = None, version: str | None = None, machine: str | None = None, mode: str | None = None, compute_default: bool = False, cores: int | None = None) -> Platform :classmethod: Return a Platform object. :param platform_name: if None or empty then automatically detect current platform (native). Otherwise should be a valid platform string. :param version: if None, assume default OS version or find it automatically (native case only). Otherwise should be a valid version string. :param machine: name of the machine :param mode: an os mode (ex: rtp for vxworks) :param compute_default: if True compute the default Arch for the current machine (this parameter is for internal purpose only). :param cores: if not None force a number of apparent cores .. py:method:: to_dict(full_os_version: bool = False) -> dict[str, Any] Export os and cpu variables as os_{var} and cpu_{var}. :param full_os_version: False by default. If True, use the full os version as OS version (with major, minor etc...) if available. Otherwize, use a potential partial OS version. :return: a dictionary representing the current Arch instance .. py:method:: __str__() -> str Return a representation string of the object.