我试图在我的Python脚本中运行它:
for i in array:
subprocess.Popen("python ~/path/myMrjob.py", "--domain "+i, "~/otherPath/* > ~/otherPath2/"+i+"/output-unsorted.log")
我看到了:TypeError: bufSize must be an integer
答案 0 :(得分:1)
您应该将要发送到shell的字符串列表传递给Popen
as the first argument:
for i in array:
subprocess.Popen(["python ~/path/myMrjob.py", "--domain "+i, "~/otherPath/* > ~/otherPath2/"+i+"/output-unsorted.log"])