[SciPy-user] scipy.test output

RA Ralf_Ahlbrink at web.de
Fri Nov 15 11:01:32 EST 2002


On Freitag, 15. November 2002 15:51:15, Pearu Peterson wrote:
> On Fri, 15 Nov 2002, RA wrote:
> > I want to analyze and store the output of scipy.test().
> > But it's a mixture of stdout and stderr, and the output after redirection
> > via shell (2>&1) is in the wrong order.
> > I also tried 'import sys; sys.stderr = sys.stdout' before 'import scipy;
> > scipy.test()" without success.
> > Any hint?
>
> sys.stderr = sys.stdout would not work because some of the messages
> may come from Fortran that are impossible to catch from Python.

bummer!

>
> Use script to get the desired result:
>
> $ script scipy_test.log
> $ python -c 'import scipy;scipy.test(1)'
> $ ^D
> $ less scipy_test.log
>
> Pearu

It's not straight forward. But it works.

Thanks, Ralf.


>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user




More information about the SciPy-User mailing list