Suppressing Python wanings globally
Paul Moore
p.f.moore at gmail.com
Thu Oct 2 18:39:29 EDT 2008
How can I suppress a Python warning globally (i.e., for all instances
of Python I run)? I have a test suite that runs Python via
sys.executable, so the -W flag won't work. A wrapper script doesn't
work, as sys.executable doesn't point to that. And PYTHONSTARTUP is
only for interactive use, so that's no good...
Is there an obvious way I've missed? Surely this is a common issue?
Paul.
More information about the Python-list
mailing list