Top "Subprocess" questions

The Python subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes.

How to suppress or capture the output of subprocess.run()?

From the examples in docs on subprocess.run() it seems like there shouldn't be any output from subprocess.run(["ls", "…

python python-3.x subprocess
How to just call a command and not get its output

In Python, what is the shortest and the standard way of calling a command through subprocess but not bothering with …

python subprocess
How to spawn parallel child processes on a multi-processor system?

I have a Python script that I want to use as a controller to another Python script. I have a …

python exec subprocess multiprocessing
Python: Using popen poll on background process

I am running a long process (actually another python script) in the background. I need to know when it has …

python python-3.x popen subprocess
How do I hide the console when I use os.system() or subprocess.call()?

I wrote some statements like below: os.system(cmd) #do something subprocess.call('taskkill /F /IM exename.exe') both will …

python windows console subprocess
Run background process in Python and do NOT wait

My goal is simple: kick off rsync and DO NOT WAIT. Python 2.7.9 on Debian Sample code: rsync_cmd = "/usr/bin/…

python subprocess background-process popen
how to kill (or avoid) zombie processes with subprocess module

When I kick off a python script from within another python script using the subprocess module, a zombie process is …

python subprocess
Getting an error - AttributeError: 'module' object has no attribute 'run' while running subprocess.run(["ls", "-l"])

I am running on a AIX 6.1 and using Python 2.7. Want to execute following line but getting an error. subprocess.run(["…

python python-2.7 subprocess aix
How to write to stdout AND to log file simultaneously with Popen?

I am using Popen to call a shell script that is continuously writing its stdout and stderr to a log …

python subprocess popen
Python threading multiple bash subprocesses?

How does one use the threading and subprocess modules to spawn parallel bash processes? When I start threads ala the …

python multithreading subprocess