supressing warning message?

Mark Harrison mh at pixar.com
Thu Jul 29 19:16:04 CEST 2004


Jeff Epler wrote:
> Here's a brute-force way to silence all warnings:
>     import warnings; warnings.filterwarnings('ignore')
> you might want to use something a little more targeted.

Now I'm doing this, and it works perfectly:

warnings.filterwarnings('ignore')
import Sybase
warnings.filterwarnings('always')

Thanks!
Mark



More information about the Python-list mailing list