因为重定向的 `` 都不是参数。不能用参数的方式传递。 大概的这么写(没测): with open("...\\i.in") as fpin, open("..\\1_1.out", "w") as fpout: subprocess.Popen(["..\\1"], stdin=fpin, stdout=fpout); [Popen](https://link.segmentfault.com/?enc=RHeDC6ZloK8Zrb%2Bvea6hmA%3D%3D.6n8UOO9iZznwi8WOxOkn8lBC8YqD49GLzf9H0Hp5FCjbBTTrylLlJaYVBNvTz73CROYT5tL6IhJagWKCDKP5112QAiEm5GxD9JgCRzv2PyA%3D) > stdin, stdout and stderr specify the executed program’s standard input, > standard output and standard error file handles, respectively. Valid values > are None, PIPE, DEVNULL, an existing file descriptor (a positive integer), > and an existing file object with a valid file descriptor. With the default > settings of None, no redirection will occur. PIPE indicates that a new pipe > to the child should be created. DEVNULL indicates that the special file > os.devnull will be used. Additionally, stderr can be STDOUT, which indicates > that the stderr data from the applications should be captured into the same > file handle as for stdout.