Peter Otten wrote:
> funkyj wrote:
>
> > I've been googling around trying to find the answer to this question
> > but all I've managed to turn up is a 2 year old post of someone else
> > asking the same question (no answer though).
> How about monkey-patching?
>
> import warnings
>
> def formatwarning(message, category, filename, lineno):
> return "%s:%s: %s: %s\n" % (filename, lineno,
> category.__name__, message)
>
> warnings.formatwarning = formatwarning
>
> warnings.warn("so what")
Thanks, that did the trick!
--
http://mail.python.org/mailman/listinfo/python-list