(1)system()方法

 这个方法是直接调用标准C的system() 函数,在一个子终端运行系统命令

 python调用系统命令的方法

 

(2)poen()方法

这个方法执行命令后通过一个管道文件将结果返回

 python调用系统命令的方法

 

3、subprocess

(1)check_output()方法

 python调用系统命令的方法

 

(2)call()方法

 python调用系统命令的方法

 

(3)Popen()方法

 python调用系统命令的方法

 

4、commands模块

返回一个元组

(2)getoutput()方法

 python调用系统命令的方法

 

(2)getstatusoutput()方法

 

 python调用系统命令的方法

 

 

也就了解这莫多,希望大佬朋友多多指点批评

相关文章:

  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2022-02-17
猜你喜欢
  • 2021-05-20
  • 2022-02-15
  • 2022-01-02
  • 2021-12-06
  • 2021-05-31
  • 2021-12-06
相关资源
相似解决方案