How can I tell in which working directory a subprocess should be launched?
14:44 10 Jul 2012

How do you specify what directory the python module subprocess uses to execute commands? I want to run a C program and process it's output in Python in near realtime.

I want to excute the command (this runs my makefile for my C program:

make run_pci

In:

/home/ecorbett/hello_world_pthread

I also want to process the output from the C program in Python. I'm new to Python so example code would be greatly appreciated!

Thanks, Edward

python subprocess