Re: [SOLVED] Calling multiple programs with subprocess

2010-04-30 Thread Amit Uttamchandani
On Sat, Apr 24, 2010 at 08:22:14AM +0530, Kushal Kumaran wrote: [snip] > > Run a shell (cmd.exe, I think) using subprocess and send it the > commands you want to run using the communicate() method. > Actually, I ended up using stdin.write('...\n'), and it works as expected: # #

Re: Calling multiple programs with subprocess

2010-04-23 Thread Kushal Kumaran
On Sat, Apr 24, 2010 at 1:21 AM, Amit Uttamchandani wrote: > On Thu, Apr 22, 2010 at 10:12:47PM -0400, Dave Angel wrote: >> amit wrote: >> >How does one go about calling multiple programs using subprocess? >> > >> >This is the program flow: >> > >> >C:\> wrenv.exe >> >C:\> make clean >> >.. >> >..

Re: Calling multiple programs with subprocess

2010-04-23 Thread Amit Uttamchandani
On Thu, Apr 22, 2010 at 10:12:47PM -0400, Dave Angel wrote: > 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 enviro

Re: Calling multiple programs with subprocess

2010-04-23 Thread Bryan
amit asked: > 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 >

Re: Calling multiple programs with subprocess

2010-04-22 Thread Dave Angel
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 clea

Re: Calling multiple programs with subprocess

2010-04-22 Thread News123
Hi Amit, As far as I know you can't really do this with subprocess, because wrenv.exe and make would be called in different contexts. THus wrenve.exe couldn't change the environment. just try following: - create a .bat file with both commands in it - verify, that the bat file works - call the

Calling multiple programs with subprocess

2010-04-22 Thread amit
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.