warnings

J

John Hunter

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
 
R

Roy Smith

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top