S
S
Stepan Sidorov2020-06-09 10:14:04
Python
Stepan Sidorov, 2020-06-09 10:14:04

How to constantly get data from a running program through cmd.exe?

Hey!
Here I have a program that I can run in python like this

import subprocess
subprocess.check_output("./stripe","listen")

And this program is constantly running, and constantly writes out data from the server.
I need to constantly receive this data, without turning off the process. THOSE. subprocess.check_output() writes out data only when the process ends, and I need to receive data without terminating the process.
Since it's done now (example above) doesn't give me real time data.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2020-06-09
@Stepan47

subprocess.Popen()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question