Google Groups unterstützt keine neuen Usenet-Beiträge oder ‑Abos mehr. Bisherige Inhalte sind weiterhin sichtbar.

warnings

3 Aufrufe
Direkt zur ersten ungelesenen Nachricht

John Hunter

ungelesen,
15.04.2004, 08:45:1615.04.04
an 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

ungelesen,
15.04.2004, 10:18:0315.04.04
an
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 neue Nachrichten