Skip to main content

platform

simple python function to get the current running platform

Usage

import currentplatform as cp

cp.platform            # the current OS, or 'unknown' if not supported

cp.desktop_platforms   # ('win', 'macosx', 'linux')
cp.mobile_platforms    # ('android', 'ios')
cp.platforms           # every supported OS (desktop + mobile)

cp.is_supported()      # False when running on an unsupported OS

# test whether we run on a desktop or a smartphone
if cp.platform in cp.desktop_platforms:
    print("running on a desktop")
elif cp.platform in cp.mobile_platforms:
    print("running on a smartphone")
else:
    print("unsupported platform")

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

krozark_current_platform-0.2.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

krozark_current_platform-0.2.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file krozark_current_platform-0.2.0.tar.gz.

File metadata

File hashes

Hashes for krozark_current_platform-0.2.0.tar.gz
Algorithm Hash digest
SHA256 88f6ee3ee69fe9760f7503a695345e92ea62459ad218e50978ff10a151188fe5
MD5 ad1c8796fc9ce49df6aa7e5cd09ecd94
BLAKE2b-256 ed84f2e2c0607d0e094fa6fdfa3935732ab647f79560dacf4d712ad3f493f84a

See more details on using hashes here.

File details

Details for the file krozark_current_platform-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for krozark_current_platform-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 476ddf18ef3ecb9e3221bfba7a13687bb30180d27fcc35db50ff4b8186b21335
MD5 13272e3d69eb0e60ede614697a3af96b
BLAKE2b-256 5a8b4fd686d0220325674fce5180603a720308b73cb452fc95ee43a15885c3f3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page