python中的popen和subprocess
import os from subprocess import Popen, PIPE res = os.popen('xx.exe E:\\test\\file1 E:\\test\\file2') print res.read() ps = Popen("xx.exe E:\\test\\file1 E:\\test\\file2", shell = True, stdout = PIPE, stderr = PIPE) res = ps.stdout.read() print res

浙公网安备 33010602011771号