Re: Getting stdout and stderr from subprocess in correct order

2017-03-04 Thread Ivan "Rambius" Ivanov
Hello, Thank you all for your suggestions. I will see what will apply to my use case. Regards Rambius On Sat, Mar 4, 2017 at 5:37 PM, Piet van Oostrum wrote: > "Ivan \"Rambius\" Ivanov" writes: > >> Dear colleagues, >> >> I using subprocess module and I am wondering how I can get the output >>

Re: Getting stdout and stderr from subprocess in correct order

2017-03-04 Thread Piet van Oostrum
"Ivan \"Rambius\" Ivanov" writes: > Dear colleagues, > > I using subprocess module and I am wondering how I can get the output > of the spawned process's stdout and stderr in the right order. Here > are my sample programs: > > $ cat subprc.py > import subprocess > import sys > > f = 'hw.py' > p =

Re: Getting stdout and stderr from subprocess in correct order

2017-03-04 Thread dieter
"Ivan \"Rambius\" Ivanov" writes: > ... > I using subprocess module and I am wondering how I can get the output > of the spawned process's stdout and stderr in the right order. Here > are my sample programs: > > $ cat subprc.py > import subprocess > import sys > > f = 'hw.py' > p = subprocess.run(

Re: Getting stdout and stderr from subprocess in correct order

2017-03-03 Thread Ben Finney
"Ivan \"Rambius\" Ivanov" writes: > When I run it through subprc.py, I do get standard out and standard > errors streams, but they are separated and not in the order above That's right. You have two entirely distinct streams, they don't attempt to co-ordinate and none of the information in the s