Source code

Revision control

Copy as Markdown

Other Tools

import sys
platform_name = {
# From Python version 3.3: On Linux, sys.platform doesn't contain the major version anymore.
# It is always 'linux'. See
"linux": "linux",
"linux2": "linux",
"win32": "windows",
"cygwin": "windows",
"darwin": "mac"
}.get(sys.platform)