当前位置: 首页>>代码示例>>Python>>正文


Python platform.python_build方法代码示例

本文整理汇总了Python中platform.python_build方法的典型用法代码示例。如果您正苦于以下问题:Python platform.python_build方法的具体用法?Python platform.python_build怎么用?Python platform.python_build使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在platform的用法示例。


在下文中一共展示了platform.python_build方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def __init__(self, base_dir, config, backup_time, seed_uri, argv=None):
        StateBase.__init__(self, base_dir, config)
        self.base_dir            = base_dir
        self.state['backup']     = True
        self.state['completed']  = False
        self.state['name']       = backup_time
        self.state['method']     = config.backup.method
        self.state['path']       = base_dir
        self.state['cmdline']    = argv
        self.state['config']     = config.dump()
        self.state['version']    = config.version
        self.state['git_commit'] = config.git_commit
        self.state['host']     = {
            'hostname': platform.node(),
            'uname':    platform.uname(),
            'python': {
                'build':   platform.python_build(),
                'version': platform.python_version()
            }
        }
        self.state['seed']       = {
            'uri':     seed_uri.str(),
            'replset': seed_uri.replset
        }
        self.init() 
开发者ID:Percona-Lab,项目名称:mongodb_consistent_backup,代码行数:27,代码来源:State.py

示例2: pytest_benchmark_generate_machine_info

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def pytest_benchmark_generate_machine_info():
    python_implementation = platform.python_implementation()
    python_implementation_version = platform.python_version()
    if python_implementation == 'PyPy':
        python_implementation_version = '%d.%d.%d' % sys.pypy_version_info[:3]
        if sys.pypy_version_info.releaselevel != 'final':
            python_implementation_version += '-%s%d' % sys.pypy_version_info[3:]
    return {
        "node": platform.node(),
        "processor": platform.processor(),
        "machine": platform.machine(),
        "python_compiler": platform.python_compiler(),
        "python_implementation": python_implementation,
        "python_implementation_version": python_implementation_version,
        "python_version": platform.python_version(),
        "python_build": platform.python_build(),
        "release": platform.release(),
        "system": platform.system(),
        "cpu": get_cpu_info(),
    } 
开发者ID:ionelmc,项目名称:pytest-benchmark,代码行数:22,代码来源:plugin.py

示例3: get_system_info

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def get_system_info():
    return """
System Details:

    Version:  %s
    Compiler: %s
    Build:    %s
    Platform: %s
    System:   %s
    Node:     %s
    Release:  %s
    Version:  %s

""" % (
        platform.python_version(),
        platform.python_compiler(),
        platform.python_build(),
        platform.platform(),
        platform.system(),
        platform.node(),
        platform.release(),
        platform.version(),
    ) 
开发者ID:laffra,项目名称:happymac,代码行数:25,代码来源:error.py

示例4: check_python

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def check_python():
    print('----------Python Info----------')
    print('Version      :', platform.python_version())
    print('Compiler     :', platform.python_compiler())
    print('Build        :', platform.python_build())
    print('Arch         :', platform.architecture()) 
开发者ID:awslabs,项目名称:dynamic-training-with-apache-mxnet-on-aws,代码行数:8,代码来源:diagnose.py

示例5: python_version_string

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def python_version_string():
    """We use it to generate per python folder name, where
    we will install all packages.
    """
    if platform.python_implementation() == 'PyPy':
        version_info = sys.pypy_version_info
    else:
        version_info = sys.version_info
    version_string = '{v.major}.{v.minor}.{v.micro}'.format(v=version_info)
    build, _ = platform.python_build()
    build = build.replace(':', '_')  # windows do not understand `:` in path
    return '{}-{}-{}'.format(platform.python_implementation(), version_string, build) 
开发者ID:Deepwalker,项目名称:pundler,代码行数:14,代码来源:pundle.py

示例6: getSoftwareInfo

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def getSoftwareInfo ():
    """ Get software info for inclusion into warcinfo """
    return {
            'platform': platform.platform (),
            'python': {
                'implementation': platform.python_implementation(),
                'version': platform.python_version (),
                'build': platform.python_build ()
                },
            'self': getRequirements (__package__)
        } 
开发者ID:PromyLOPh,项目名称:crocoite,代码行数:13,代码来源:util.py

示例7: __init__

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def __init__(self):
        super().__init__()
        self['revscoring_version'] = __version__
        self['platform'] = platform.platform()
        self['machine'] = platform.machine()
        self['version'] = platform.version()
        self['system'] = platform.system()
        self['processor'] = platform.processor()
        self['python_build'] = platform.python_build()
        self['python_compiler'] = platform.python_compiler()
        self['python_branch'] = platform.python_branch()
        self['python_implementation'] = platform.python_implementation()
        self['python_revision'] = platform.python_revision()
        self['python_version'] = platform.python_version()
        self['release'] = platform.release() 
开发者ID:wikimedia,项目名称:revscoring,代码行数:17,代码来源:environment.py

示例8: print_environment

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def print_environment():
    """For reporting bugs - spits out the user's environment"""
    import sys
    version = {}
    for pkg in 'moldesign IPython ipywidgets jupyter matplotlib numpy docker pyccc distutils' \
               'nbmolviz jupyter_client jupyter_core pint Bio openbabel simtk pyscf pip setuptools'\
            .split():
        try:
            module = __import__(pkg)
        except ImportError as e:
            version[pkg] = str(e)
        else:
            try:
                version[pkg] = module.__version__
            except AttributeError as e:
                version[pkg] = str(e)
    env = {'platform': sys.platform,
           'version': sys.version,
           'prefix': sys.prefix}

    try:
        import platform
        env['machine'] = platform.machine()
        env['linux'] = platform.linux_distribution()
        env['mac'] = platform.mac_ver()
        env['windows'] = platform.win32_ver()
        env['impl'] = platform.python_implementation()
        env['arch'] = platform.architecture()
        env['system'] = platform.system()
        env['python_build'] = platform.python_build()
        env['platform_version'] = platform.version()

    except Exception as e:
        env['platform_exception'] = str(e)

    print(json.dumps({'env': env,
                      'versions': version})) 
开发者ID:Autodesk,项目名称:molecular-design-toolkit,代码行数:39,代码来源:data.py

示例9: test_python_build

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def test_python_build(self):
        res = platform.python_build() 
开发者ID:ofermend,项目名称:medicare-demo,代码行数:4,代码来源:test_platform.py

示例10: __init__

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def __init__(self, parent = None, aw = None):
        super(platformDlg,self).__init__(parent, aw)
        self.setModal(True)
        self.setWindowTitle(QApplication.translate("Form Caption","Artisan Platform", None))
        platformdic = {}
        platformdic["Architecture"] = str(platform.architecture())
        platformdic["Machine"] = str(platform.machine())
        platformdic["Platform name"] =  str(platform.platform())
        platformdic["Processor"] = str(platform.processor())
        platformdic["Python Build"] = str(platform.python_build())
        platformdic["Python Compiler"] = str(platform.python_compiler())
        platformdic["Python Branch"] = str(platform.python_branch())
        platformdic["Python Implementation"] = str(platform.python_implementation())
        platformdic["Python Revision"] = str(platform.python_revision())
        platformdic["Release"] = str(platform.release())
        platformdic["System"] = str(platform.system())
        platformdic["Version"] = str(platform.version())
        platformdic["Python version"] = str(platform.python_version())
        system = str(platform.system())
        if system == "Windows":
            platformdic["Win32"] = str(platform.win32_ver())
        elif system == "Darwin":
            platformdic["Mac"] = str(platform.mac_ver())
        elif system == "Linux":
            platformdic["Linux"] = str(platform.linux_distribution())
            platformdic["Libc"] = str(platform.libc_ver())
        htmlplatform = "<b>version =</b> " + __version__ + " (" + __revision__ + ")<br>"
        for key in sorted(platformdic):
            htmlplatform += "<b>" + key + " = </b> <i>" + platformdic[key] + "</i><br>"
        platformEdit = QTextEdit()
        platformEdit.setHtml(htmlplatform)
        platformEdit.setReadOnly(True)
        layout = QVBoxLayout()
        layout.addWidget(platformEdit)
        self.setLayout(layout) 
开发者ID:artisan-roaster-scope,项目名称:artisan,代码行数:37,代码来源:platform.py

示例11: version_details

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def version_details():
    from ansible import __version__ as ansible_version  # noqa
    from infrared import __version__  # noqa
    python_version = platform.python_version()
    python_revision = ', '.join(platform.python_build())
    return "{__version__} (" \
        "ansible-{ansible_version}, " \
        "python-{python_version})".format(**locals()) 
开发者ID:redhat-openstack,项目名称:infrared,代码行数:10,代码来源:__init__.py

示例12: initialize_lib

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def initialize_lib():
    global BCL_INSTALL_DIR, BCL_DATA_DIR, BITCOINLIB_VERSION
    instlogfile = Path(BCL_DATA_DIR, 'install.log')
    if instlogfile.exists():
        return

    with instlogfile.open('w') as f:
        install_message = "BitcoinLib installed, check further logs in bitcoinlib.log\n\n" \
                          "If you remove this file all settings will be reset again to the default settings. " \
                          "This might be usefull after an update or when problems occur.\n\n" \
                          "Installation parameters. Include this parameters when reporting bugs and issues:\n" \
                          "Bitcoinlib version: %s\n" \
                          "Installation date : %s\n" \
                          "Python            : %s\n" \
                          "Compiler          : %s\n" \
                          "Build             : %s\n" \
                          "OS Version        : %s\n" \
                          "Platform          : %s\n" % \
                          (BITCOINLIB_VERSION, datetime.now().isoformat(), platform.python_version(),
                           platform.python_compiler(), platform.python_build(), platform.version(), platform.platform())
        f.write(install_message)

    # Copy data and settings file
    from shutil import copyfile
    for file in Path(BCL_INSTALL_DIR, 'data').iterdir():
        if file.suffix not in ['.ini', '.json']:
            continue
        copyfile(str(file), str(Path(BCL_DATA_DIR, file.name)))

# Initialize library 
开发者ID:1200wd,项目名称:bitcoinlib,代码行数:32,代码来源:config.py

示例13: display_platform_information

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def display_platform_information():
    """
    Display platform information.
    """
    import platform
    output_string = '\n-- INFORMATION: PLATFORM & OS ---------\n'

    try:

        output_string = add_param_to_output(output_string,
                                            'OS',
                                            platform.platform())
        output_string = add_param_to_output(output_string,
                                            'OS release version',
                                            platform.version())
        output_string = add_param_to_output(output_string,
                                            'machine',
                                            platform.machine())
        output_string = add_param_to_output(output_string,
                                            'node',
                                            platform.node())
        output_string = add_param_to_output(output_string,
                                            'python version',
                                            platform.python_version())
        output_string = add_param_to_output(output_string,
                                            'python build',
                                            platform.python_build())
        output_string = add_param_to_output(output_string,
                                            'python compiler',
                                            platform.python_compiler())

    except Exception:
        output_string += 'Some platform information cannot be displayed\n'
    output_string += '----------------------------------------'
    neon_logger.display(output_string) 
开发者ID:NervanaSystems,项目名称:neon,代码行数:37,代码来源:display_information.py

示例14: get_machine_infos

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def get_machine_infos(self):
        """the function retrieves some information about the host and returns them as a list"""
        infos = {}
        infos["Machine"] = platform.machine()
        infos["Hostname"] = platform.node()
        infos["Platform"] = platform.platform()
        infos["Python Build"] = platform.python_build()
        infos["Python Compiler"] = platform.python_compiler()
        infos["Python Implementation"] = platform.python_implementation()
        infos["Python Version"] = platform.python_version()
        infos["Release"] = platform.release()
        infos["Libc Version"] = platform.libc_ver()
        return infos 
开发者ID:jpylypiw,项目名称:easywall,代码行数:15,代码来源:webutils.py

示例15: get_user_agent

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_build [as 别名]
def get_user_agent():
    sdk_version = "CognitePythonSDK/{}".format(get_current_sdk_version())

    python_version = "{}/{} ({};{})".format(
        platform.python_implementation(), platform.python_version(), platform.python_build(), platform.python_compiler()
    )

    os_version_info = [platform.release(), platform.machine(), platform.architecture()[0]]
    os_version_info = [s for s in os_version_info if s]  # Ignore empty strings
    os_version_info = "-".join(os_version_info)
    operating_system = "{}/{}".format(platform.system(), os_version_info)

    return "{} {} {}".format(sdk_version, python_version, operating_system) 
开发者ID:cognitedata,项目名称:cognite-sdk-python,代码行数:15,代码来源:_auxiliary.py


注:本文中的platform.python_build方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。