Answers for "python process get output"

0

subprocess.check_output python

import subprocess
py2output = subprocess.check_output(['python', 'py2.py', '-i', 'test.txt'])
print('py2 said:', py2output)
Posted by: Guest on March-01-2021
0

python get output

>out = subprocess.Popen(['wc', '-l', 'my_text_file.txt'], 
           stdout=subprocess.PIPE, 
           stderr=subprocess.STDOUT)
Posted by: Guest on December-12-2020

Python Answers by Framework

Browse Popular Code Answers by Language