[SciPy-user] "catching warnings"

Robert Kern robert.kern at gmail.com
Tue Sep 19 17:07:46 CDT 2006

Robert Clewley wrote:
> The situation is worse than that. Some of the print statements are 
> actually in legacy Fortran code that is wrapped as DLLs, e.g. the VODE 
> integrator in odepack.py.
> This is quite unfortunate when it comes to using these modules as part of 
> more sophisticated algorithms, for which more control over the output to 
> the user or internal detection of problems is desired. The idea of legacy 
> code in this context is not to have to change it and then worry about 
> providing the edited source with your distribution, etc....
> So I'm considering an exploration of whether I can suppress output to 
> stdout or stderr in a simple and platform-independent way when I call DLLs 
> like VODE, and then have my code reconstruct information about the 
> warnings from the verbose output options that many of those codes have. 
> Does anyone have any experience of trying this?



Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

More information about the SciPy-user mailing list