purpen 发表于 2013-1-15 03:15:24

python 执行系统命令比较

在此比较一下两种方法执行系统命令的方法,以方便于日后运用:(

1. os.system()


<div class="dp-highlighter">   
[*]system(command) -> exit_status     
[*]         
[*]Execute the command (a string) in a subshell.     
[*]     
[*]     
[*]# 仅仅在一个子终端运行系统命令,而不能获取命令执行后的返回信息..  
页: [1]
查看完整版本: python 执行系统命令比较