On this page
  1. platform.machine
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

platform.machine

Prev: platform.mac_ver | Up: platform | Next: platform.node
Rel: platform.android_ver, platform.AndroidVer, platform.architecture, platform.freedesktop_os_release
Ref: docs.python.org — platform.machine
Tags: #public #python3 #stdlib #platform


Import

import platform
from platform import machine

Signature & Overview

platform.machine()

Returns the machine type, e.g. 'i386' An empty string is returned if the value cannot be determined.

Usage

import platform

m = platform.machine()
assert isinstance(m, str) and len(m) > 0

Gotchas

REPL Inspect

from platform import machine
help(machine)

Linked from

Related notes