Python Write Subprocess Stdout Stderr do złożenia

with open("stdout.txt","wb") as out, open("stderr.txt","wb") as err:
    subprocess.Popen("ls",stdout=out,stderr=err)
Outrageous Octopus