subprocess

 

    result = subprocess.Popen(s.format(mp3files), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    out = result.stdout.read()
    temp = str(out.decode('utf-8'))

  

 17.5. subprocess — Subprocess management — Python 3.5.5 documentation  https://docs.python.org/3.5/library/subprocess.html

 

 

Source code: Lib/subprocess.py


The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. This module intends to replace several older modules and functions:

os.system
os.spawn*

Information about how the subprocess module can be used to replace these modules and functions can be found in the following sections.

 

posted @ 2018-05-08 20:51  papering  阅读(220)  评论(0编辑  收藏  举报