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 can I specify working directory for popen

Is there a way to specify the running directory of command in Python's subprocess.Popen()? For example: Popen('c:\mytool\…

python subprocess popen
Launch a shell command with in a python script, wait for the termination and return to the script

I've a python script that has to launch a shell command for every file in a dir: import os files = …

python subprocess popen os.execl
Python popen command. Wait until the command is finished

I have a script where I launch with popen a shell command. The problem is that the script doesn't wait …

python subprocess wait popen
live output from subprocess command

I'm using a python script as a driver for a hydrodynamics code. When it comes time to run the simulation, …

python shell logging error-handling subprocess
What can lead to "IOError: [Errno 9] Bad file descriptor" during os.system()?

I am using a scientific software including a Python script that is calling os.system() which is used to run …

python subprocess posix file-descriptor ioerror
How can I run an external command asynchronously from Python?

I need to run a shell command asynchronously from a Python script. By this I mean that I want my …

python asynchronous subprocess scheduler
Using sudo with Python script

I'm trying to write a small script to mount a VirtualBox shared folder each time I execute the script. I …

python shell subprocess
How to catch exception output from Python subprocess.check_output()?

I'm trying to do a Bitcoin payment from within Python. In bash I would normally do this: bitcoin sendtoaddress <…

python bash subprocess
Subprocess changing directory

I want to execute a script inside a subdirectory/superdirectory (I need to be inside this sub/super-directory first). I …

python subprocess
running a command as a super user from a python script

So I'm trying to get a process to be run as a super user from within a python script using …

python subprocess sudo