Answer the question
In order to leave comments, you need to log in
How to pass input to the command line in python when starting an external application?
How to make the code work
cmd = "my_data | app.exe -p1 -p2 -p3 "
run_cmd = subprocess.Popen(cmd)
Answer the question
In order to leave comments, you need to log in
Try
subprocess.run(Твоя команда, shell=True) #не возвращает вывод командной строки
subprocess.getoutput(Твоя команда, shell=True) #возвращает вывод командной строки.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question