Created
April 5, 2017 09:20
-
-
Save gmic/c62c8fd5ccc286c5e31d3f77f2663529 to your computer and use it in GitHub Desktop.
Pipe subprocess to output file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my_cmd = ['cat'] + input_files | |
with open('myfile', "w") as outfile: | |
subprocess.call(my_cmd, stdout=outfile) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment