Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python write subprocess stdout stderr to file

with open("stdout.txt","wb") as out, open("stderr.txt","wb") as err:
    subprocess.Popen("ls",stdout=out,stderr=err)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #write #subprocess #stdout #stderr #file
ADD COMMENT
Topic
Name
7+4 =