Google Groupes n'accepte plus les nouveaux posts ni abonnements Usenet. Les contenus de l'historique resteront visibles.

warnings

3 vues
Accéder directement au premier message non lu

John Hunter

non lue,
15 avr. 2004, 08:45:1615/04/2004
à 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

non lue,
15 avr. 2004, 10:18:0315/04/2004
à
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 nouveau message