← All notes

Python platform: identify the underlying system

Answer: The platform module exposes identifying data about the underlying system. platform.platform() returns a single human-readable string. Other helpers include architecture(), which queries a given executable for bits and linkage. Values may be empty when they cannot be determined.

Examples

import platform
print(platform.platform())
print(platform.architecture())

Rules

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Python docs, platform — Access to underlying platform's identifying data; CPython, Lib/platform.py. PSF-2.0 (https://docs.python.org/3/license.html). Copyright Python Software Foundation. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Python docs, platform — Access to underlying platform's identifying data; CPython, Lib/platform.py. PSF-2.0 (https://docs.python.org/3/license.html). Copyright Python Software Foundation.

Cite this

Permanent ID: iil:note:5s4by9c2

iinventedlight. 2026. "Python platform: identify the underlying system." iinventedlight Library, iil:note:5s4by9c2, version of 2026-11-18. https://iinventedlight.com/library/notes/python-platform/. License: CC-BY-4.0.

@misc{iil_note_5s4by9c2,
  author = {{iinventedlight}},
  title = {{Python platform: identify the underlying system}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-18},
  url = {https://iinventedlight.com/library/notes/python-platform/},
  note = {Permanent ID iil:note:5s4by9c2. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/python-platform.md.