How do you get rid of useless warnings?
skip at pobox.com
skip at pobox.com
Tue Oct 7 11:28:08 EDT 2008
Grant> In the meantime, how do I get rid of this useless warning?
I thought something like this would work:
% python2.5 -W 'ignore:.*:Warning:.*:0'
Python 2.5.3a0 (release25-maint:66627M, Sep 26 2008, 14:40:24)
[GCC 4.2.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> with = 8
<stdin>:1: Warning: 'with' will become a reserved keyword in Python 2.6
but so far, no joy in Mudville. Futz around with that and see if you can
make it work. I used this documentation section to come up with what I've
got so far:
http://www.python.org/doc/2.5.2/lib/warning-filter.html
The 2.6 docs look more fleshed out:
http://docs.python.org/library/warnings.html
but I haven't checked to see if it offers a little more detail about
supressing warnings from the command line.
HTH,
Skip
More information about the Python-list
mailing list