25 Feb
2015
25 Feb
'15
11:17 a.m.
On 25.02.15 11:55, Steven D'Aprano wrote:
I think there are three questions that should be asked:
(1) How does one easy and simply enable warnings in the interactive interpeter?
Same as for other warnings. import warnings; warnings.simplefilter('once', DeprecationWarning) Or 'module', 'always', 'error'.
(2) If they are enabled by default, how does one easily and simply disable the again? E.g. from the command line itself, or from your PYTHONSTARTUP file.
Same as for other warnings. import warnings; warnings.simplefilter('ignore', DeprecationWarning)