Keep a subprocess alive and keep giving it commands? Python
If I spawn a new subprocess in python with a given command (let’s say I start the python interpreter with the python command), how can I send new data to the process (via STDIN)?
If I spawn a new subprocess in python with a given command (let’s say I start the python interpreter with the python command), how can I send new data to the process (via STDIN)?
I’ve a python script that has to launch a shell command for every file in a dir:
Suppose there’s an executable and a Python script to launch it, and they’re located in ‘sibling’ subdirectories, e.g.
I’m trying to launch a completely independent process from python. I can’t use something simple like os.startfile since I need to pass arguments. Currently I’m using subprocess.popen which gets me 90% of the way there.
My goal is simple: kick off rsync and DO NOT WAIT.
I’m working on a nifty little function: