Supress SWIGLAL and htcondor warning when importing cwinpy in IPython
Following lscsoft/lalsuite!2202 (merged), when you import cwinpy
in an IPython notebook, you get the associated warning. While this is intended, it is also a bit annoying. There is also a htcondor
warning that gets output too, if you are on a machine without HTCondor installed. These should be suppressed on import of cwinpy
, by wrapping the imports in __init__.py
with, e.g.,
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", message="Wswiglal-redir-stdio")
warnings.filterwarnings("ignore", message="(.*)CONDOR_CONFIG(.*)")
...