platform.freedesktop_os_release
Prev: platform.architecture | Up: platform | Next: platform.invalidate_caches
Rel: platform.android_ver, platform.AndroidVer, platform.architecture, platform.invalidate_caches
Ref: docs.python.org — platform.freedesktop_os_release
Tags: #public #python3 #stdlib #platform
Import
import platform
from platform import freedesktop_os_release
Signature & Overview
platform.freedesktop_os_release()
Return operation system identification from freedesktop.org os-release
Usage
import platform
# Python 3.10+ Linux-only: parses /etc/os-release into a dict
assert hasattr(platform, "freedesktop_os_release") or True
Gotchas
- Linux-only (Python 3.10+): Raises
OSErroron macOS/Windows.
REPL Inspect
from platform import freedesktop_os_release
help(freedesktop_os_release)
Linked from
- tuts/python3/stdlib_module/platform
- tuts/python3/stdlib_module/platform/android_ver
- tuts/python3/stdlib_module/platform/AndroidVer
- tuts/python3/stdlib_module/platform/architecture
- tuts/python3/stdlib_module/platform/invalidate_caches
- tuts/python3/stdlib_module/platform/ios_ver
- tuts/python3/stdlib_module/platform/IOSVersionInfo
- tuts/python3/stdlib_module/platform/java_ver
- tuts/python3/stdlib_module/platform/libc_ver
- tuts/python3/stdlib_module/platform/mac_ver
- tuts/python3/stdlib_module/platform/machine
- tuts/python3/stdlib_module/platform/node
- tuts/python3/stdlib_module/platform/platform
- tuts/python3/stdlib_module/platform/processor
- tuts/python3/stdlib_module/platform/python_branch
- tuts/python3/stdlib_module/platform/python_build
- tuts/python3/stdlib_module/platform/python_compiler
- tuts/python3/stdlib_module/platform/python_implementation
- tuts/python3/stdlib_module/platform/python_revision
- tuts/python3/stdlib_module/platform/python_version
- tuts/python3/stdlib_module/platform/python_version_tuple
- tuts/python3/stdlib_module/platform/release
- tuts/python3/stdlib_module/platform/system
- tuts/python3/stdlib_module/platform/system_alias
- tuts/python3/stdlib_module/platform/uname
- tuts/python3/stdlib_module/platform/uname_result
- tuts/python3/stdlib_module/platform/version
- tuts/python3/stdlib_module/platform/win32_edition
- tuts/python3/stdlib_module/platform/win32_is_iot
- tuts/python3/stdlib_module/platform/win32_ver
Related notes
- tuts/python3/stdlib_module/platform/android_ver Linked here; links to this page; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/AndroidVer Linked here; links to this page; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/architecture Linked here; links to this page; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/invalidate_caches Linked here; links to this page; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/platform Linked here; links to this page; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/ios_ver links to this page; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/IOSVersionInfo links to this page; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/java_ver links to this page; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/libc_ver links to this page; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/mac_ver links to this page; shared tags: #platform, #stdlib