run a python script with python and catch command line output

Solutions on MaxInterview for run a python script with python and catch command line output by the best coders in the world

showing results for - "run a python script with python and catch command line output"
Lou
13 Mar 2018
1import os
2cmd = 'wc -l my_text_file.txt > out_file.txt'
3os.system(cmd)
4
similar questions