> Anyhow, I've replaced it with this:
> 
> 
> from subprocess import Popen, PIPE, STDOUT
> p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE,
>                                     stderr=STDOUT, close_fds=True)
> output, unused = p.communicate()
> status = p.returncode
> 
> 
> Does that look more windows-friendly?


Unfortunately, no.

close_fds is also not available on windows (or at least not
when trying to capture stderr with stdout like this.)

So, now I'm going with ...

p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE,
                                                                      
stderr=STDOUT)


I don't really understand what close_fds does. I only put it
in because it was in the example code.

I have a report that this code works on windows,
and it is also working for me on linux.


_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to