platform模块可以获取操作系统的相关信息。

>>> platform.system()   #获取系统名称
'Linux'
>>> platform.architecture() #获取系统位数
('64bit', 'ELF')
>>> platform.platform() #获取操作系统名称及版本号
'Linux-2.6.32-696.6.3.el6.x86_64-x86_64-with-centos-6.8-Final'
>>> platform.uname() #汇总信息
uname_result(system='Linux', node='zww', release='2.6.32-696.6.3.el6.x86_64', version='#1 SMP Wed Jul 12 14:17:22 UTC 2017', machine='x86_64', processor='x86_64')

python3之platform模块的更多相关文章

  1. python基础系列教程——Python3.x标准模块库目录

    python基础系列教程——Python3.x标准模块库目录 文本 string:通用字符串操作 re:正则表达式操作 difflib:差异计算工具 textwrap:文本填充 unicodedata ...

  2. python3.7 sys模块

    #!/usr/bin/env python __author__ = "lrtao2010" #python3.7 sys模块 #sys模块负责程序与python解释器的交互,提供 ...

  3. python之platform模块

    python之platform模块 ^_^第三个模块从天而降喽!! 函数列表 platform.system() 获取操作系统类型,windows.linux等 platform.platform() ...

  4. Python第十一天 异常处理 glob模块和shlex模块 打开外部程序和subprocess模块 subprocess类 Pipe管道 operator模块 sorted函数 os模块 hashlib模块 platform模块 csv模块

    Python第十一天    异常处理  glob模块和shlex模块    打开外部程序和subprocess模块  subprocess类  Pipe管道  operator模块   sorted函 ...

  5. platform模块

    import platform ''' python中,platform模块给我们提供了很多方法去获取操作系统的信息 如: import platform platform.platform() #获 ...

  6. Python3之turtle模块的使用

    Python3之turtle模块的使用     直接扣代码就行: import turtle as t t.pensize(4) t.hideturtle() t.colormode(255) t.c ...

  7. python 模块之platform模块(基本了解)

    # -*- coding: cp936 -*-#python 27#xiaodeng#python 模块之platform模块(基本了解)#获取底层平台的识别数据 #知道该模块用途即可,需要使用时直接 ...

  8. Python3:Requests模块的异常值处理

    Python3:Requests模块的异常值处理 用Python的requests模块进行爬虫时,一个简单高效的模块就是requests模块,利用get()或者post()函数,发送请求. 但是在真正 ...

  9. Python3中正则模块re.compile、re.match及re.search函数用法详解

    Python3中正则模块re.compile.re.match及re.search函数用法 re模块 re.compile.re.match. re.search 正则匹配的时候,第一个字符是 r,表 ...

随机推荐

  1. java web 读取数据库数据写入Excel返回浏览器下载

    @RequestMapping(value = "/download", method = RequestMethod.GET) public void downstudents( ...

  2. RxSwift + Moya + ObjectMapper

    https://www.jianshu.com/p/173915b943af use_frameworks! target 'RXDemo' do pod 'RxSwift' pod 'RxCocoa ...

  3. 2018-2019-2 网络对抗技术 20165336 Exp3 免杀原理与实践

    2018-2019-2 网络对抗技术 20165336 Exp3 免杀原理与实践 1.基础问题回答 (1)杀软是如何检测出恶意代码的? 根据计算机病毒课程知道了每个病毒都有其对应的特征码,杀软是根据这 ...

  4. webpack摸索笔记

    上一个链接,入门webpack看这篇文章最好:https://segmentfault.com/a/1190000006178770 1.先安装好node 2.建个项目文件 3,.window+r,打 ...

  5. VisualStudioCode创建的asp.net core项目部署到IIS,以及遇到的问题

    一.发布项目 在visual studio code中通过命令“dotnet publish”,如下图: 这里我把发布位置设置到了D:\WebSite\netcoredemo下. 二.设置IIS 0. ...

  6. Fiddler忽略捕捉大文件流

    Fiddler是款非常不错的抓包软件,可以方便的捕捉各种软件发起的HTTP请求,甚至可以在发送给服务器前或响应给应用前修改数据.但是在使用时发现,在开启Fiddler时,在浏览器中下载文件时不会马上弹 ...

  7. ADB——连接手机的三种方式

    有USB连接 硬件状态正常. 包括 Android 设备处于正常开机状态,USB 连接线和各种接口完好. Android 设备的开发者选项和 USB 调试模式已开启. 可以到「设置」-「开发者选项」- ...

  8. Linux的top命令学习【转载】

    转自:https://blog.csdn.net/sanshiqiduer/article/details/1933625 1.top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的 ...

  9. xgboost 最优参数, df某一个字段进行字符串搜索

    0.909323  with:   {'max_depth': 6, 'min_child_weight': 0.8, 'n_estimators': 800} df_huoguo = df[df.c ...

  10. Django 分组 聚合

    base_sql = Order.objects.filter(is_paid=True, merchant=merchant_id) # 如果aggregate前没有values,得到的结果是一个字 ...