From c7b3533b2fe7e19ac3128d75ba9b24d91d7ac4ad Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauld.mccarthy@gmail.com> Date: Wed, 7 Jan 2015 13:55:29 +0000 Subject: [PATCH] Suppress matplotlib backend warning on startup --- fsl/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fsl/__init__.py b/fsl/__init__.py index 7dd20a930..e5a75ef19 100644 --- a/fsl/__init__.py +++ b/fsl/__init__.py @@ -51,13 +51,18 @@ also provide the following module level attributes: """ import logging -log = logging.getLogger(__name__) +import warnings import os import sys -import logging import argparse +log = logging.getLogger(__name__) + +# make matplotlib quiet +warnings.filterwarnings('ignore', module='matplotlib') + + # There's a bug in OpenGL.GL.shaders (which has been fixed in # the latest version) - it calls logging.basicConfig(), and # thus screws up our own logging. We overcome this by configuring -- GitLab