multiple times subprocess fails on windows
jakub.vysoky at gmail.com
Mon Nov 22 12:24:56 CET 2010
To be more specific, I have something like this in rvirtualenv itself
(that's the pokus.py file):
I generate a batch file like this (that's the pokus.bat file):
And after that, I run the pokus.bat file from a test (that's the
from subprocess import Popen, PIPE
p = Popen('pokus.bat', stdout=PIPE, stderr=PIPE, shell=True)
stdout, stderr = p.communicate()
And the problem is, that I don't receive the output of the os.system
to the PIPE. Probable there is something different on windows stdout
redirection, because similar stuff works on linux..
On Nov 21, 8:39 pm, kvbik <jakub.vys... at gmail.com> wrote:
> in a test suite in my project (called rvirtualenv ) I discovered a
> strange behaviour when calling from python a batch file which calles
> another python and this calles a shell command.
> I know it sounds pretty strange, but I do this only because I am
> testing such specific tool (that has similar functionality like
> original virtualenv and there are things like activate.bat commands).
> I've uploaded some code snippet here:
> If anyone could explain me this behaviour I would be more than happy,
> because right now it is the only failing test in my project ;).
> Thanks in advance, Jakub..
More information about the Python-list