Did I find the right examples for you? yes no

All Samples(401)  |  Call(378)  |  Derive(0)  |  Import(23)
Returns a single string identifying the underlying platform
with as much useful information as possible (but no more :).

The output is intended to be human readable rather than
machine parseable. It may look different on different
platforms and this is intended.

If "aliased" is true, the function will use aliases for
various platforms that report system names which differ from
their common names, e.g. SunOS will be reported as(more...)

        def platform(aliased=0, terse=0):

    """ Returns a single string identifying the underlying platform
        with as much useful information as possible (but no more :).

        The output is intended to be human readable rather than
        machine parseable. It may look different on different
        platforms and this is intended.

        If "aliased" is true, the function will use aliases for
        various platforms that report system names which differ from
        their common names, e.g. SunOS will be reported as
        Solaris. The system_alias() function is used to implement
        this.

        Setting terse to true causes the function to return only the
        absolute minimum information needed to identify the platform.

    """
    result = _platform_cache.get((aliased, terse), None)
    if result is not None:
        return result

    # Get uname information and then apply platform specific cosmetics
    # to it...
    system,node,release,version,machine,processor = uname()
    if machine == processor:
        processor = ''
    if aliased:
        system,release,version = system_alias(system,release,version)

    if system == 'Windows':
        # MS platforms
        rel,vers,csd,ptype = win32_ver(version)
        if terse:
            platform = _platform(system,release)
        else:
            platform = _platform(system,release,version,csd)

    elif system in ('Linux',):
        # Linux based systems
        distname,distversion,distid = dist('')
        if distname and not terse:
            platform = _platform(system,release,machine,processor,
                                 'with',
                                 distname,distversion,distid)
        else:
            # If the distribution name is unknown check for libc vs. glibc
            libcname,libcversion = libc_ver(sys.executable)
            platform = _platform(system,release,machine,processor,
                                 'with',
                                 libcname+libcversion)
    elif system == 'Java':
        # Java platforms
        r,v,vminfo,(os_name,os_version,os_arch) = java_ver()
        if terse or not os_name:
            platform = _platform(system,release,version)
        else:
            platform = _platform(system,release,version,
                                 'on',
                                 os_name,os_version,os_arch)

    elif system == 'MacOS':
        # MacOS platforms
        if terse:
            platform = _platform(system,release)
        else:
            platform = _platform(system,release,machine)

    else:
        # Generic handler
        if terse:
            platform = _platform(system,release)
        else:
            bits,linkage = architecture(sys.executable)
            platform = _platform(system,release,machine,processor,bits,linkage)

    _platform_cache[(aliased, terse)] = platform
    return platform
        


src/c/o/codespeed-HEAD/sample_project/client.py   codespeed(Download)
 
    if not data.get('environment', None):
        data['environment'] = platform.platform(aliased=True)
 
    f = urllib.urlopen(url, urllib.urlencode(data))

src/b/e/BeginningPythonExercises-HEAD/other/system_admin/PULSA/pythonForSystemAdmin/src/example_8_1.py   BeginningPythonExercises(Download)
platform.machine(),
platform.node(),
platform.platform(),
platform.processor(),
platform.python_build(),

src/f/o/foobnix-HEAD/foobnix/util/LOG.py   foobnix(Download)
 
    logging.debug('==Platform==')
    logging.debug('Normal :' + platform.platform())
    logging.debug('Aliased:' + platform.platform(aliased=True))
    logging.debug('Terse  :' + platform.platform(terse=True))

src/g/r/Grognaks-Mod-Manager-HEAD/main.py   Grognaks-Mod-Manager(Download)
    try:
        logging.info("%s" % global_config.APP_NAME)
        logging.info("Platform:    %s" % platform.platform(aliased=True, terse=False))
        logging.info("Interpreter: %s %s (%s)" % (platform.python_implementation(), platform.python_version(), ("64bit" if (sys.maxsize > 2**32) else "32bit")))
        logging.info("")

src/p/y/pyradar-0.2/pyradar/utils/system_info.py   pyradar(Download)
 
    platform_info = {
        'platform': platform.platform(aliased=True),
    }
 

src/g/i/gitstack-HEAD/python/Lib/site-packages/setuptools/command/upload.py   gitstack(Download)
        comment = ''
        if command=='bdist_egg' and self.distribution.has_ext_modules():
            comment = "built on %s" % platform.platform(terse=1)
        data = {
            ':action':'file_upload',
                comment = 'built for %s %s' % (dist, version)
        elif command == 'bdist_dumb':
            comment = 'built for %s' % platform.platform(terse=1)
        data['comment'] = comment
 

src/a/n/antisocial-HEAD/ve/lib/python2.7/site-packages/setuptools/command/upload.py   antisocial(Download)
        comment = ''
        if command=='bdist_egg' and self.distribution.has_ext_modules():
            comment = "built on %s" % platform.platform(terse=1)
        data = {
            ':action':'file_upload',
                comment = 'built for %s %s' % (dist, version)
        elif command == 'bdist_dumb':
            comment = 'built for %s' % platform.platform(terse=1)
        data['comment'] = comment
 

src/d/d/ddocker-HEAD/bin/pex.venv/lib/python2.7/site-packages/setuptools/command/upload.py   ddocker(Download)
        comment = ''
        if command=='bdist_egg' and self.distribution.has_ext_modules():
            comment = "built on %s" % platform.platform(terse=1)
        data = {
            ':action':'file_upload',
                comment = 'built for %s %s' % (dist, version)
        elif command == 'bdist_dumb':
            comment = 'built for %s' % platform.platform(terse=1)
        data['comment'] = comment
 

src/r/o/rolf-HEAD/ve/lib/python2.7/site-packages/setuptools/command/upload.py   rolf(Download)
        comment = ''
        if command=='bdist_egg' and self.distribution.has_ext_modules():
            comment = "built on %s" % platform.platform(terse=1)
        data = {
            ':action':'file_upload',
                comment = 'built for %s %s' % (dist, version)
        elif command == 'bdist_dumb':
            comment = 'built for %s' % platform.platform(terse=1)
        data['comment'] = comment
 

src/w/i/wizlang-HEAD/venv/lib/python2.7/site-packages/setuptools/command/upload.py   wizlang(Download)
        comment = ''
        if command=='bdist_egg' and self.distribution.has_ext_modules():
            comment = "built on %s" % platform.platform(terse=1)
        data = {
            ':action':'file_upload',
                comment = 'built for %s %s' % (dist, version)
        elif command == 'bdist_dumb':
            comment = 'built for %s' % platform.platform(terse=1)
        data['comment'] = comment
 

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next