def get_platform():
if os.name == '<STR_LIT>':<EOL><INDENT>prefix = "<STR_LIT>"<EOL>i = sys.version.find(prefix)<EOL>if i == -<NUM_LIT:1>:<EOL><INDENT>return sys.platform<EOL><DEDENT>j = sys.version.find("<STR_LIT:)>", i)<EOL>look = sys.version[i+len(prefix):j].lower()<EOL>if look == '<STR_LIT>':<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>if look == '<STR_LIT>':<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>return sys.platform<EOL><DEDENT>if os.name != "<STR_LIT>" or not hasattr(os, '<STR_LIT>'):<EOL><INDENT>return sys.platform<EOL><DEDENT>osname, host, release, version, machine = os.uname()<EOL>osname = osname.lower().replace('<STR_LIT:/>', '<STR_LIT>')<EOL>machine = machine.replace('<STR_LIT:U+0020>', '<STR_LIT:_>')<EOL>machine = machine.replace('<STR_LIT:/>', '<STR_LIT:->')<EOL>if osname[:<NUM_LIT:5>] == "<STR_LIT>":<EOL><INDENT>return  "<STR_LIT>" % (osname, machine)<EOL><DEDENT>elif osname[:<NUM_LIT:5>] == "<STR_LIT>":<EOL><INDENT>if release[<NUM_LIT:0>] >= "<STR_LIT:5>":           <EOL><INDENT>osname = "<STR_LIT>"<EOL>release = "<STR_LIT>" % (int(release[<NUM_LIT:0>]) - <NUM_LIT:3>, release[<NUM_LIT:2>:])<EOL><DEDENT><DEDENT>elif osname[:<NUM_LIT:4>] == "<STR_LIT>":              <EOL><INDENT>return "<STR_LIT>" % (osname, release)<EOL><DEDENT>elif osname[:<NUM_LIT:3>] == "<STR_LIT>":<EOL><INDENT>return "<STR_LIT>" % (osname, version, release)<EOL><DEDENT>elif osname[:<NUM_LIT:6>] == "<STR_LIT>":<EOL><INDENT>osname = "<STR_LIT>"<EOL>rel_re = re.compile(r'<STR_LIT>')<EOL>m = rel_re.match(release)<EOL>if m:<EOL><INDENT>release = m.group()<EOL><DEDENT><DEDENT>elif osname[:<NUM_LIT:6>] == "<STR_LIT>":<EOL><INDENT>cfgvars = get_config_vars()<EOL>macver = cfgvars.get('<STR_LIT>')<EOL>if True:<EOL><INDENT>macrelease = macver<EOL>try:<EOL><INDENT>f = open('<STR_LIT>')<EOL><DEDENT>except IOError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>m = re.search(r'<STR_LIT>'<EOL>r'<STR_LIT>', f.read())<EOL><DEDENT>finally:<EOL><INDENT>f.close()<EOL><DEDENT>if m is not None:<EOL><INDENT>macrelease = '<STR_LIT:.>'.join(m.group(<NUM_LIT:1>).split('<STR_LIT:.>')[:<NUM_LIT:2>])<EOL><DEDENT><DEDENT><DEDENT>if not macver:<EOL><INDENT>macver = macrelease<EOL><DEDENT>if macver:<EOL><INDENT>release = macver<EOL>osname = "<STR_LIT>"<EOL>if ((macrelease + '<STR_LIT:.>') >= '<STR_LIT>' and<EOL>'<STR_LIT>' in get_config_vars().get('<STR_LIT>', '<STR_LIT>').strip()):<EOL><INDENT>machine = '<STR_LIT>'<EOL>cflags = get_config_vars().get('<STR_LIT>')<EOL>archs = re.findall('<STR_LIT>', cflags)<EOL>archs = tuple(sorted(set(archs)))<EOL>if len(archs) == <NUM_LIT:1>:<EOL><INDENT>machine = archs[<NUM_LIT:0>]<EOL><DEDENT>elif archs == ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>machine = '<STR_LIT>'<EOL><DEDENT>elif archs == ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>machine = '<STR_LIT>'<EOL><DEDENT>elif archs == ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>machine = '<STR_LIT>'<EOL><DEDENT>elif archs == ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>machine = '<STR_LIT>'<EOL><DEDENT>elif archs == ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>machine = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>" % (archs,))<EOL><DEDENT><DEDENT>elif machine == '<STR_LIT>':<EOL><INDENT>if sys.maxsize >= <NUM_LIT:2>**<NUM_LIT:32>:<EOL><INDENT>machine = '<STR_LIT>'<EOL><DEDENT><DEDENT>elif machine in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>if sys.maxsize >= <NUM_LIT:2>**<NUM_LIT:32>:<EOL><INDENT>machine = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>machine = '<STR_LIT>'<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return "<STR_LIT>" % (osname, release, machine)<EOL>
Return a string that identifies the current platform.

    This is used mainly to distinguish platform-specific build directories and
    platform-specific built distributions.  Typically includes the OS name
    and version and the architecture (as supplied by 'os.uname()'),
    although the exact information included depends on the OS; eg. for IRIX
    the architecture isn't particularly important (IRIX only runs on SGI
    hardware), but for Linux the kernel version isn't particularly
    important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u
       irix-5.3
       irix64-6.2

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win-ia64 (64bit Windows on Itanium)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.