Python Forum

Full Version: How to keep the process alive?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

I wanted to keep the process alive while opening a process using subprocess and keep firing the commands and read its output throughout the execution. which should support both python3 and python2. If any suggestions would really help.

Regards,
Maiya
Please clearly explain the goal of your software.
Perhaps subprocess is not required at all.
I need to write/read data to and from subprocess without closing the pipe, will close in end of the execution (process should be available entire duration)

Need to fire the command and get the output without closing the process, since process will close only in the end of the execution.