FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

pythonnative/docs/api/platform.md at main · pythonnative/pythonnative · GitHub

Latest commit

 

History

History
29 lines (22 loc) · 913 Bytes

File metadata and controls

29 lines (22 loc) · 913 Bytes

Platform

The [Platform][pythonnative.Platform] class exposes runtime information about the host platform and a select helper for writing platform-aware code without scattering if IS_IOS / if IS_ANDROID branches throughout the codebase.

::: pythonnative.platform options: show_root_heading: false show_root_toc_entry: false members_order: source filters: ["!^_"]

Quick reference

Attribute Values
Platform.OS "ios", "android", "web", or "test"
Platform.Version Best-effort OS version string
Platform.is_ios / Platform.is_android / Platform.is_web / Platform.is_test Booleans
Platform.select(spec, default=None) Pick a value matching the current platform
  • "web" means the pn preview browser preview.

See also


Back | FazBrowse Home | New Git URL