15.15.1.跨平台¶

platform.architecture(executable=sys.executable, bits='', linkage='')¶

Queries the given executable (defaults to the Python interpreter binary) for

various architecture information.

Returns a tuple (bits, linkage) which contain information about the bit

architecture and the linkage format used for the executable. Both values are

returned as strings.

Values that cannot be determined are returned as given by the parameter presets.

If bits is given as '', the sizeof(pointer) (or

sizeof(long) on Python version < 1.5.2) is used as indicator for the

supported pointer size.

The function relies on the system’s file command to do the actual work.

This is available on most if not all Unix platforms and some non-Unix platforms

and then only if the executable points to the Python interpreter. Reasonable

defaults are used when the above needs are not met.

注解

On Mac OS X (and perhaps other platforms), executable files may be

universal files containing multiple architectures.

To get at the “64-bitness” of the current interpreter, it is more

reliable to query the sys.maxsize attribute:

is_64bits = sys.maxsize > 2**32

platform.machine()¶

Returns the machine type, e.g. 'i386'. An empty string is returned if the

value cannot be determined.

platform.node()¶

Returns the computer’s network name (may not be fully qualified!). An empty

string is returned if the value cannot be determined.

platform.platform(aliased=0, terse=0)¶

Returns a single string identifying the underlying platform with as much useful

information as possible.

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, for example 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.

platform.processor()¶

Returns the (real) processor name, e.g. 'amdk6'.

An empty string is returned if the value cannot be determined. Note that many

platforms do not provide this information or simply return the same value as for

machine(). NetBSD does this.

platform.python_build()¶

Returns a tuple (buildno, builddate) stating the Python build number and

date as strings.

platform.python_compiler()¶

Returns a string identifying the compiler used for compiling Python.

platform.python_branch()¶

Returns a string identifying the Python implementation SCM branch.

2.6 新版功能.

platform.python_implementation()¶

Returns a string identifying the Python implementation. Possible return values

are: ‘CPython’, ‘IronPython’, ‘Jython’, ‘PyPy’.

2.6 新版功能.

platform.python_revision()¶

Returns a string identifying the Python implementation SCM revision.

2.6 新版功能.

platform.python_version()¶

Returns the Python version as string 'major.minor.patchlevel'.

Note that unlike the Python sys.version, the returned value will always

include the patchlevel (it defaults to 0).

platform.python_version_tuple()¶

Returns the Python version as tuple (major, minor, patchlevel) of strings.

Note that unlike the Python sys.version, the returned value will always

include the patchlevel (it defaults to '0').

platform.release()¶

Returns the system’s release, e.g. '2.2.0' or 'NT' An empty string is

returned if the value cannot be determined.

platform.system()¶

Returns the system/OS name, e.g. 'Linux', 'Windows', or 'Java'. An

empty string is returned if the value cannot be determined.

platform.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.

platform.version()¶

Returns the system’s release version, e.g. '#3 on degas'. An empty string is

returned if the value cannot be determined.

platform.uname()¶

Fairly portable uname interface. Returns a tuple of strings (system, node,

release, version, machine, processor) identifying the underlying platform.

Note that unlike the os.uname() function this also returns possible

processor information as additional tuple entry.

Entries which cannot be determined are set to ''.

pythonplatform标识_15.15. platform — 获取底层平台的标识数据 — Python 2.7.18 文档相关推荐

  1. java计算机毕业设计社区养老综合服务平台服务端源码+系统+数据库+lw文档+mybatis+运行部署

    java计算机毕业设计社区养老综合服务平台服务端源码+系统+数据库+lw文档+mybatis+运行部署 java计算机毕业设计社区养老综合服务平台服务端源码+系统+数据库+lw文档+mybatis+运 ...

  2. java计算机毕业设计家教平台系统源码+mysql数据库+系统+lw文档+部署

    java计算机毕业设计家教平台系统源码+mysql数据库+系统+lw文档+部署 java计算机毕业设计家教平台系统源码+mysql数据库+系统+lw文档+部署 本源码技术栈: 项目架构:B/S架构 开 ...

  3. 基于JAVA政府采购线上招投标平台计算机毕业设计源码+系统+数据库+lw文档+部署

    基于JAVA政府采购线上招投标平台计算机毕业设计源码+系统+数据库+lw文档+部署 基于JAVA政府采购线上招投标平台计算机毕业设计源码+系统+数据库+lw文档+部署 本源码技术栈: 项目架构:B/S ...

  4. 基于JAVA心灵治愈服务平台计算机毕业设计源码+系统+数据库+lw文档+部署

    基于JAVA心灵治愈服务平台计算机毕业设计源码+系统+数据库+lw文档+部署 基于JAVA心灵治愈服务平台计算机毕业设计源码+系统+数据库+lw文档+部署 本源码技术栈: 项目架构:B/S架构 开发语 ...

  5. java计算机毕业设计BS模式快递运输平台2021源码+mysql数据库+系统+lw文档+部署

    java计算机毕业设计BS模式快递运输平台2021源码+mysql数据库+系统+lw文档+部署 java计算机毕业设计BS模式快递运输平台2021源码+mysql数据库+系统+lw文档+部署 本源码技 ...

  6. 计算机毕业设计Java移动垃圾分类车管理平台(源码+系统+mysql数据库+Lw文档)

    计算机毕业设计Java移动垃圾分类车管理平台(源码+系统+mysql数据库+Lw文档) 计算机毕业设计Java移动垃圾分类车管理平台(源码+系统+mysql数据库+Lw文档) 本源码技术栈: 项目架构 ...

  7. java计算机毕业设计智友少儿编程学习平台源码+mysql数据库+系统+部署+lw文档

    java计算机毕业设计智友少儿编程学习平台源码+mysql数据库+系统+部署+lw文档 java计算机毕业设计智友少儿编程学习平台源码+mysql数据库+系统+部署+lw文档 本源码技术栈: 项目架构 ...

  8. 计算机毕业设计Java校园闲置物品交换平台系统(源码+系统+mysql数据库+lw文档

    计算机毕业设计Java校园闲置物品交换平台系统(源码+系统+mysql数据库+lw文档 计算机毕业设计Java校园闲置物品交换平台系统(源码+系统+mysql数据库+lw文档) 本源码技术栈: 项目架 ...

  9. 基于JAVA房屋租赁平台计算机毕业设计源码+系统+数据库+lw文档+部署

    基于JAVA房屋租赁平台计算机毕业设计源码+系统+数据库+lw文档+部署 基于JAVA房屋租赁平台计算机毕业设计源码+系统+数据库+lw文档+部署 本源码技术栈: 项目架构:B/S架构 开发语言:Ja ...

最新文章

  1. 迷宫出路代码_如何在软件开发的迷宫中找到自己的出路
  2. 最牛X的GCC 内联汇编
  3. 配置实验室计算机步骤,计算机网络实验指导书(new)
  4. Linux_RHEV虚拟化_基础理论KVM
  5. python在中国的发展-python在中国的现状和发展趋势
  6. cuda二维数组内存分配和数据拷贝
  7. 【CV】ECCV2020图像分割开源论文合集
  8. 合并K个排序链表—leetcode23
  9. Java中string拼接,StringBuilder,StringBuffer和+
  10. java成绩查询_JavaWeb项目第三次总结_成绩查询的实现
  11. 云耀云服务器性能怎么样,华为云测评:2CPU+4G内存+5M带宽的云耀云服务器HECS
  12. 下划线_Python中下划线的5种含义
  13. 一道容易栽坑的有趣的面试题(关于js,定时器,闭包等)
  14. Colly 爬虫学习笔记(一)——爬虫框架,抓取中金公司行业市盈率数据
  15. 戴尔服务器连接显示器无信号 键盘灯不亮,键盘灯不亮按键没反应怎么回事及解决办法...
  16. 多工序、多机台(产线)环境下的排程要点
  17. 轻量级工作流引擎snaker 2.0.0
  18. 客户心声|腾讯云数据库助力国信证券反洗钱系统分布式改造
  19. vue中plain=true是什么意思
  20. 你了解通配符泛域名https证书吗

热门文章

  1. UVA 1631 Locker(HDU 4433)(DP)
  2. 实战python设计模式_实战Python设计模式:可复用面向对象软件开发实践
  3. 服务器命令提示符修复,怎么用命令提示符来修复XP系统
  4. 格莱美全明星团队推出区块链音乐版权项目TUNE
  5. 一个石头剪刀布游戏的python解法
  6. 单选框radio总结
  7. MYSQL圆角矩形表示_android 利用Bitmap获取圆角矩形、圆形图片
  8. 服务器里那个文件是地图的爆率,dnf数据芯片哪里出的多 dnf数据芯片爆率最高地图介绍...
  9. excel计算机考试标注星期几,Excel 根据日期标注中文及英文的星期几
  10. 脉冲电子围栏系统介绍_脉冲电子围栏系统构成原理及优势分析