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

platform.architecture

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


Import

import platform
from platform import architecture

Signature & Overview

platform.architecture(executable='/opt/homebrew/opt/python@3.14/bin/python3.14', bits='', linkage='')

Queries the given executable (defaults to the Python interpreter binary) for various architecture information.

Usage

import platform

bits, linkage = platform.architecture()
assert bits in ("32bit", "64bit")

Gotchas

REPL Inspect

from platform import architecture
help(architecture)

Linked from

Related notes