Did I find the right examples for you? yes no

All Samples(26)  |  Call(24)  |  Derive(0)  |  Import(2)
Returns (system,release,version) aliased to common
marketing names used for some systems.

It also does some reordering of the information in some cases
where it would otherwise cause confusion.

        def system_alias(system,release,version):

    """ Returns (system,release,version) aliased to common
        marketing names used for some systems.

        It also does some reordering of the information in some cases
        where it would otherwise cause confusion.

    """
    if system == 'Rhapsody':
        # Apple's BSD derivative
        # XXX How can we determine the marketing release number ?
        return 'MacOS X Server',system+release,version

    elif system == 'SunOS':
        # Sun's OS
        if release < '5':
            # These releases use the old name SunOS
            return system,release,version
        # Modify release (marketing release = SunOS release - 3)
        l = string.split(release,'.')
        if l:
            try:
                major = int(l[0])
            except ValueError:
                pass
            else:
                major = major - 3
                l[0] = str(major)
                release = string.join(l,'.')
        if release < '6':
            system = 'Solaris'
        else:
            # XXX Whatever the new SunOS marketing name is...
            system = 'Solaris'

    elif system == 'IRIX64':
        # IRIX reports IRIX64 on platforms with 64-bit support; yet it
        # is really a version and not a different platform, since 32-bit
        # apps are also supported..
        system = 'IRIX'
        if version:
            version = version + ' (64bit)'
        else:
            version = '64bit'

    elif system in ('win32','win16'):
        # In case one of the other tricks
        system = 'Windows'

    return system,release,version
        


src/c/a/calibre-HEAD/src/calibre/debug.py   calibre(Download)
        except:
            pass
    out(platform.system_alias(platform.system(), platform.release(),
            platform.version()))
    out('Python', platform.python_version())

src/a/l/ally-py-0.9.0/ally/support/util_deploy.py   ally-py(Download)
from ally.support.util_io import synchronizeURIToDir
from ally.zip.util_zip import getZipFilePath, validateInZipPath, ZIPSEP
from platform import system, machine, system_alias, release, version, \
    linux_distribution
from zipfile import ZipFile
    'Linux' and the kernel version.
    '''
    sys, rel, ver = system_alias(system(), release(), version())
    if sys == 'Linux':
        sys, rel, _relname = linux_distribution()

src/a/l/ally-1.0/ally/support/util_deploy.py   ally(Download)
# TODO: Gabriel: see if this module still makes sense
from os.path import join, isdir
from platform import system, machine, system_alias, release, version, \
    linux_distribution
from zipfile import ZipFile
    'Linux' and the kernel version.
    '''
    sys, rel, ver = system_alias(system(), release(), version())
    if sys == 'Linux':
        sys, rel, _relname = linux_distribution()

src/d/c/dctmpy-0.1.5/src/dctmpy/__init__.py   dctmpy(Download)
def get_platform_id():
    (system, release, version) = platform.system_alias(platform.system(), platform.release(), platform.version())
    if re.match("windows", system, re.I) or re.match("windows", release, re.I):
        return PLATFORMS['MS_WINDOWS']
    elif re.match("solaris", system, re.I) or re.match("solaris", release, re.I):
def get_charset_id():
    (system, release, version) = platform.system_alias(platform.system(), platform.release(), platform.version())
    data = re.split("_|\.|@?", locale.setlocale(locale.LC_ALL, ''))
    data[2] = data[2].replace("_", "-").upper()
    if data[2] in CHARSETS:

src/i/n/IncPy-HEAD/Lib/test/test_platform.py   IncPy(Download)
    def test_system_alias(self):
        res = platform.system_alias(
            platform.system(),
            platform.release(),
            platform.version(),

src/s/l/SlopPy-HEAD/Lib/test/test_platform.py   SlopPy(Download)
    def test_system_alias(self):
        res = platform.system_alias(
            platform.system(),
            platform.release(),
            platform.version(),

src/o/p/openvault-core-HEAD/hydra-jetty/webapps/media/WEB-INF/lib/Lib/test/test_platform.py   openvault-core(Download)
    def test_system_alias(self):
        res = platform.system_alias(
            platform.system(),
            platform.release(),
            platform.version(),

src/p/l/plexnet-HEAD/third_party/generic/pypy/lib-python/2.5.2/test/test_platform.py   plexnet(Download)
    def test_system_alias(self):
        res = platform.system_alias(
            platform.system(),
            platform.release(),
            platform.version(),

src/f/i/Field-HEAD/Contents/lib/python/test/test_platform.py   Field(Download)
    def test_system_alias(self):
        res = platform.system_alias(
            platform.system(),
            platform.release(),
            platform.version(),

src/b/a/babble-HEAD/include/jython/Lib/test/test_platform.py   babble(Download)
    def test_system_alias(self):
        res = platform.system_alias(
            platform.system(),
            platform.release(),
            platform.version(),

  1 | 2 | 3  Next