[SciPy-user] "catching warnings"

Christian Meesters meesters at uni-mainz.de
Wed Sep 20 07:24:43 CDT 2006

On Tuesday 19 September 2006 23:26, A. M. Archibald wrote:
> On 19/09/06, Stefan van der Walt <stefan at sun.ac.za> wrote:
> > You can change warnings into exceptions, afaik.  Take a look at the
> > Python documentation on warning filters at
> Unfortunately, they're not warnings at all, they're just print
> statements - so not only can you not control them, they appear on
> stdout (and not stderr), contaminating the output of your program.
> This is far from the only module that does this, either (for example,
> odepack.py. quadrature.py, optimize.py... grepping for "print" should
> turn them up)
I only now got into reading this. But, well, at least it explains my failed 
attempts in trying to convert these "warnings" into exceptions, yesterday. 
Stefan, thanks anyway for pointing me on the forgotten warnings module.

Unfortunately I'm unable to provide patches as discussed later in this thread. 
But I'm glad that I initiated this debate ;-).


More information about the SciPy-user mailing list