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


Python platform.python_compiler方法代码示例

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


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

示例1: print_support_info

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_compiler [as 别名]
def print_support_info():
    click.echo('''
    If you are having issues with pyinfra or wish to make feature requests, please
    check out the GitHub issues at https://github.com/Fizzadar/pyinfra/issues .
    When adding an issue, be sure to include the following:
''')

    click.echo('    System: {0}'.format(platform.system()))
    click.echo('      Platform: {0}'.format(platform.platform()))
    click.echo('      Release: {0}'.format(platform.uname()[2]))
    click.echo('      Machine: {0}'.format(platform.uname()[4]))
    click.echo('    pyinfra: v{0}'.format(__version__))
    click.echo('    Executable: {0}'.format(sys.argv[0]))
    click.echo('    Python: {0} ({1}, {2})'.format(
        platform.python_version(),
        platform.python_implementation(),
        platform.python_compiler(),
    )) 
开发者ID:Fizzadar,项目名称:pyinfra,代码行数:20,代码来源:prints.py

示例2: pytest_benchmark_generate_machine_info

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_compiler [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_compiler [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_compiler [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: test_arraywriters

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_compiler [as 别名]
def test_arraywriters():
    # Test initialize
    # Simple cases
    if machine() == 'sparc64' and python_compiler().startswith('GCC'):
        # bus errors on at least np 1.4.1 through 1.6.1 for complex
        test_types = FLOAT_TYPES + IUINT_TYPES
    else:
        test_types = NUMERIC_TYPES
    for klass in (SlopeInterArrayWriter, SlopeArrayWriter, ArrayWriter):
        for type in test_types:
            arr = np.arange(10, dtype=type)
            aw = klass(arr)
            assert_true(aw.array is arr)
            assert_equal(aw.out_dtype, arr.dtype)
            assert_array_equal(arr, round_trip(aw))
            # Byteswapped is OK
            bs_arr = arr.byteswap().newbyteorder('S')
            bs_aw = klass(bs_arr)
            # assert against original array because POWER7 was running into
            # trouble using the byteswapped array (bs_arr)
            assert_array_equal(arr, round_trip(bs_aw))
            bs_aw2 = klass(bs_arr, arr.dtype)
            assert_array_equal(arr, round_trip(bs_aw2))
            # 2D array
            arr2 = np.reshape(arr, (2, 5))
            a2w = klass(arr2)
            # Default out - in order is Fortran
            arr_back = round_trip(a2w)
            assert_array_equal(arr2, arr_back)
            arr_back = round_trip(a2w, 'F')
            assert_array_equal(arr2, arr_back)
            # C order works as well
            arr_back = round_trip(a2w, 'C')
            assert_array_equal(arr2, arr_back)
            assert_true(arr_back.flags.c_contiguous) 
开发者ID:ME-ICA,项目名称:me-ica,代码行数:37,代码来源:test_arraywriters.py

示例6: print_sysinfo

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_compiler [as 别名]
def print_sysinfo():
    import collections
    import datetime
    import getpass
    import platform

    info = collections.OrderedDict()
    info['OS'] = platform.system()
    if psutil.OSX:
        info['version'] = str(platform.mac_ver())
    elif psutil.WINDOWS:
        info['version'] = ' '.join(map(str, platform.win32_ver()))
        if hasattr(platform, 'win32_edition'):
            info['edition'] = platform.win32_edition()
    else:
        info['version'] = platform.version()
    if psutil.POSIX:
        info['kernel'] = '.'.join(map(str, get_kernel_version()))
    info['arch'] = ', '.join(
        list(platform.architecture()) + [platform.machine()])
    info['hostname'] = platform.node()
    info['python'] = ', '.join([
        platform.python_implementation(),
        platform.python_version(),
        platform.python_compiler()])
    if psutil.POSIX:
        s = platform.libc_ver()[1]
        if s:
            info['glibc'] = s
    info['fs-encoding'] = sys.getfilesystemencoding()
    info['time'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    info['user'] = getpass.getuser()
    info['pid'] = os.getpid()
    print("=" * 70)  # NOQA
    for k, v in info.items():
        print("%-14s %s" % (k + ':', v))  # NOQA
    print("=" * 70)  # NOQA 
开发者ID:giampaolo,项目名称:psutil,代码行数:39,代码来源:__init__.py

示例7: getSystemInfo

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_compiler [as 别名]
def getSystemInfo():
    result = {"machine": platform.machine(),
              "platform": platform.platform(),
              "processor": platform.processor(),
              "cpu_count": psutil.cpu_count(),
              "os": platform.system(),
              "python_compiler": platform.python_compiler(),
              "python_version": platform.python_version()}
    return result 
开发者ID:tech-quantum,项目名称:sia-cog,代码行数:11,代码来源:sysinfo.py

示例8: _get_system_provenance

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_compiler [as 别名]
def _get_system_provenance():
    """ return JSON string containing provenance for all things that are
    fixed during the runtime"""

    bits, linkage = platform.architecture()

    return dict(
        ctapipe_version=ctapipe.__version__,
        ctapipe_resources_version=get_module_version("ctapipe_resources"),
        eventio_version=get_module_version("eventio"),
        ctapipe_svc_path=os.getenv("CTAPIPE_SVC_PATH"),
        executable=sys.executable,
        platform=dict(
            architecture_bits=bits,
            architecture_linkage=linkage,
            machine=platform.machine(),
            processor=platform.processor(),
            node=platform.node(),
            version=platform.version(),
            system=platform.system(),
            release=platform.release(),
            libcver=platform.libc_ver(),
            num_cpus=psutil.cpu_count(),
            boot_time=Time(psutil.boot_time(), format="unix").isot,
        ),
        python=dict(
            version_string=sys.version,
            version=platform.python_version_tuple(),
            compiler=platform.python_compiler(),
            implementation=platform.python_implementation(),
        ),
        environment=_get_env_vars(),
        arguments=sys.argv,
        start_time_utc=Time.now().isot,
    ) 
开发者ID:cta-observatory,项目名称:ctapipe,代码行数:37,代码来源:provenance.py

示例9: __init__

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_compiler [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

示例10: execute

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_compiler [as 别名]
def execute(self, args, console):
        print('architecture:', platform.architecture()[0])
        print('java_ver:', platform.java_ver())
        print('node:', platform.node())
        print('processor:', platform.processor())
        print('python_compiler:', platform.python_compiler())
        print('python_implementation:', platform.python_implementation())
        print('python_version:', platform.python_version())
        print('release:', platform.release()) 
开发者ID:openhab-scripters,项目名称:openhab-helper-libraries,代码行数:11,代码来源:300_JythonConsoleCommand.py

示例11: test_python_compiler

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

示例12: _get_version

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_compiler [as 别名]
def _get_version():
        dist = importlib_metadata.distribution('py7zr')
        module_name = dist.entry_points[0].name
        py_version = platform.python_version()
        py_impl = platform.python_implementation()
        py_build = platform.python_compiler()
        return "{} Version {} : {} (Python {} [{} {}])".format(module_name, py7zr.__version__, py7zr.__copyright__,
                                                               py_version, py_impl, py_build) 
开发者ID:miurahr,项目名称:py7zr,代码行数:10,代码来源:cli.py

示例13: __init__

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_compiler [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

示例14: show_aqt_version

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_compiler [as 别名]
def show_aqt_version(self):
        dist = importlib_metadata.distribution('aqtinstall')
        module_name = dist.entry_points[0].name
        py_version = platform.python_version()
        py_impl = platform.python_implementation()
        py_build = platform.python_compiler()
        self.logger.info("aqtinstall({}) v{} on Python {} [{} {}]".format(module_name, dist.version,
                                                                          py_version, py_impl, py_build)) 
开发者ID:miurahr,项目名称:aqtinstall,代码行数:10,代码来源:cli.py

示例15: initialize_lib

# 需要导入模块: import platform [as 别名]
# 或者: from platform import python_compiler [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


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