ICode9

精准搜索请尝试: 精确搜索
  • python执行shell命令2022-06-28 01:31:28

    import subprocessdef cmd(command): subp = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8") return subp.communicate()res = cmd("ls -l")res = res[0]res = res.split("\n&qu

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有