• python调用系统命令的方法


    1、os模块

    (1)system()方法

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

     

    (2)poen()方法

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

     

    3、subprocess

    (1)check_output()方法

     

    (2)call()方法

     

    (3)Popen()方法

     

    4、commands模块

    返回一个元组

    (2)getoutput()方法

     

    (2)getstatusoutput()方法

     

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

  • 相关阅读:
    10.7
    10.5
    周六
    周五
    周四
    周三
    四则运算
    zabbix——yum安装
    Stirling's Formula
    CONTRASTIVE REPRESENTATION DISTILLATION
  • 原文地址:https://www.cnblogs.com/ydy11/p/8093878.html
Copyright © 2020-2023  润新知