On Mon, Jun 21, 2010 at 6:44 AM, Felipe Vinturini <felipe.vintur...@gmail.com> wrote: <snip> > Your problem seems to be with stdout redirect to the same file: > ">YourOutput1.txt". Windows is not like Unix like systems! > You can try, instead of redirecting to the same file, redirect each to a > separate file and use the following form: > <code> > proc = subprocess.Popen(r'C:\WINDOWS\system32\cmd.exe /C > "D:\372\pythonweb\mongoose-2.8.exe -root D:\New1\ 1>YourOutput.txt 2>&1"') > </code>
I believe the cmd.exe ugliness can also be avoided altogether: proc = subprocess.Popen([r'D:\372\pythonweb\mongoose-2.8.exe', '-root', 'D:\New1\'], stderr=subprocess.STDOUT, stdout=file("YourOutput.txt", 'w')) Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list