Michael Ströder wrote:
> For tracking the cause of a UnicodeWarning I'd like to make the Python
> interpreter to raise an UnicodeError exception with full stack trace. Is
> there a short trick to achieve this?
You can control warning behaviour with the -W commandline option:
$ cat unicodewarning
2011/10/25 Michael Ströder :
> HI!
>
> For tracking the cause of a UnicodeWarning I'd like to make the Python
> interpreter to raise an UnicodeError exception with full stack trace. Is there
> a short trick to achieve this?
from exceptions import UnicodeWarning
from warnings import filterwarnings
HI!
For tracking the cause of a UnicodeWarning I'd like to make the Python
interpreter to raise an UnicodeError exception with full stack trace. Is there
a short trick to achieve this?
Many thanks in advance.
Ciao, Michael.
--
http://mail.python.org/mailman/listinfo/python-list