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

相關文章
相關標籤/搜索