Calling multiple programs with subprocess

Dave Angel davea at ieee.org
Thu Apr 22 22:12:47 EDT 2010


amit wrote:
> How does one go about calling multiple programs using subprocess?
>
> This is the program flow:
>
> C:\> wrenv.exe
> C:\> make clean
> ..
> ..
>
> The 'wrenv.exe' is necessary since it sets up the proper environment
> for building. How do I use subprocess to execute 'wrenv.exe' and then
> the 'make clean' command.
>
> Any help is appreciated.
>
> Thanks,
> Amit
>
>   
One way is to write a batch file (since you're on Windows), and execute 
that with shell=True.

It's not the only way, or the most efficient.  But it's most likely to 
work, without knowing anything more about those two programs.

DaveA




More information about the Python-list mailing list