On this page
platform.node
Prev: platform.machine | Up: platform | Next: platform.platform
Rel: platform.android_ver, platform.AndroidVer, platform.architecture, platform.freedesktop_os_release
Ref: docs.python.org — platform.node
Tags: #public #python3 #stdlib #platform
Import
import platform
from platform import node
Signature & Overview
platform.node()
Returns the computer's network name (which may not be fully qualified) An empty string is returned if the value cannot be determined.
Usage
import platform
assert isinstance(platform.node(), str)
Gotchas
- Returns the network hostname (may be empty if undetermined).
REPL Inspect
from platform import node
help(node)
Linked from
Related notes
- tuts/python3/stdlib_module/platform/machine 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/android_ver Linked here; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/AndroidVer Linked here; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/architecture Linked here; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/freedesktop_os_release Linked here; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/platform/invalidate_caches shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/ios_ver shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/IOSVersionInfo shared tags: #platform, #stdlib