March 2003
Intermediate to advanced
656 pages
39h 30m
English
filterwarnings
filterwarnings(action,message='.*',category=Warning,module='.*',lineno=0,append=False)
Adds a filter to the list of active filters. When
append is true,
filterwarnings adds the filter after all other
existing filters (i.e., appends the filter to the list of existing
filters); otherwise filterwarnings inserts the
filter before any other existing filter. All components, save
action, have default values meaning match
everything. As detailed above, message and
module are pattern strings for regular
expressions, category is some subclass of
Warning, lineno is an
integer, and action is a string that
determines what happens when a message matches this filter.
Read now
Unlock full access