/ Published in: Python
Expand |
Embed | Plain Text
from subprocess import Popen,PIPE p = Popen(file, shell=True,stdout=PIPE,stderr=PIPE) out = string.join(p.stdout.readlines() ) outerr = string.join(p.stderr.readlines() ) # old ways py<2.4 import os out= string.join(os.popen(file).readlines()) os.spawnvp(os.P_WAIT,"/usr/bin/mplayer",["","-ao","pcm",file]) # or os.spawnvp(os.P_NOWAIT,"/usr/bin/mplayer",["","-ao","pcm",file])
You need to login to post a comment.
