Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

warnings

3 views
Skip to first unread message

John Hunter

unread,
Apr 15, 2004, 8:45:16 AM4/15/04
to pytho...@python.org

In the following

import warnings
warnings.warn('change me')

The warning is issued:

hunter:~/python/test> python test.py
test.py:3: UserWarning: change me
warnings.warn('change me')


I want to supress the line echo. Eg, I just want

hunter:~/python/test> python test.py
test.py:3: UserWarning: change me


How do I configure warnings to do this?

Thanks!
John Hunter

Roy Smith

unread,
Apr 15, 2004, 10:18:03 AM4/15/04
to
Slightly off-topic, but what's the long-term future of the warnings
module? It seems the new logging module pretty much subsumes the
functionality of warning.
0 new messages