python 调用shell 命令 方式

如今把知道的调用方式写下来ide

os方式:it

  os.system(' command [option] ')io

  print os.popen(' command [option] ').read()class

commands:command

  print commands.output(' command [option] ')call

subprocess:
di

  subprocess.call([' command ','[option]'])view

  subprocess.Popen(' command ')vi

相关文章
相关标签/搜索