Python执行shell命令四法
整理:Python执行shell命令四法,示例如下:#!/usr/bin/env python# -*- coding: utf-8 -*-import osimport platformimport subprocessimport commandsdef subproc(): print "系统进程数:" subprocess.call("ps -ef|wc -l",shell=True)def os_popen(): print "IP地址:"...