调用python的platform模块
#!/usr/bin/evn python #_*_ coding:utf-8 -*- import platform print "##########操作系统信息收集#################" print "操作系统名称:" ,platform.platform() print "操作系统版本号:",platform.version() print "操作系统位数:",platform.architecture() print "计算机类型:",platform.machine() print "网络名称:",platform.node() print "CPU信息:",platform.processor() print "信息汇总:",platform.uname() print "###########python信息收集###################" print "python版本:",platform.python_build() print "python版本号:",platform.version()
执行后打印的信息