从手册中:
要在结果元组中获得除None以外的任何内容,您需要提供stdout = PIPE和/或stderr = PIPE
p2 = subprocess.Popen(["grep", "-c", "test"], stdin=p1.stdout, stdout=subprocess.PIPE)
欢迎分享,转载请注明来源:内存溢出
从手册中:
要在结果元组中获得除None以外的任何内容,您需要提供stdout = PIPE和/或stderr = PIPE
p2 = subprocess.Popen(["grep", "-c", "test"], stdin=p1.stdout, stdout=subprocess.PIPE)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)