Re: Exceptions and unicode messages

2007-03-21 Thread Tuomas
This seems to work: >>> import sys, traceback >>> def excepthook(exctype, value, tb): ... if tb: ... lines = traceback.format_tb(tb) ... for i, line in zip(range(len(lines)), lines): ... lines[i] = lines[i].decode('utf8') ... lines.insert(0, u'Traceback (

Re: Exceptions and unicode messages

2007-03-21 Thread kyosohma
On Mar 21, 6:03 am, Tuomas <[EMAIL PROTECTED]> wrote: > This works: > >>> raise StandardError(u'Wrong type') > Traceback (most recent call last): >File "", line 1, in ? > StandardError: Wrong type > > but don't in Finnish: > >>> raise StandardError(u'Väärä tyyppi') > Traceback (most recent ca

Re: Exceptions and unicode messages

2007-03-21 Thread kyosohma
On Mar 21, 6:03 am, Tuomas <[EMAIL PROTECTED]> wrote: > This works: > >>> raise StandardError(u'Wrong type') > Traceback (most recent call last): >File "", line 1, in ? > StandardError: Wrong type > > but don't in Finnish: > >>> raise StandardError(u'Väärä tyyppi') > Traceback (most recent ca

Re: Exceptions and unicode messages

2007-03-21 Thread manish kurup
Hey anybody please tell me... How we can get the properties of a file in python On 3/21/07, Tuomas <[EMAIL PROTECTED]> wrote: This works: >>> raise StandardError(u'Wrong type') Traceback (most recent call last): File "", line 1, in ? StandardError: Wrong type but don't in Finnish: >>> r

Exceptions and unicode messages

2007-03-21 Thread Tuomas
This works: >>> raise StandardError(u'Wrong type') Traceback (most recent call last): File "", line 1, in ? StandardError: Wrong type but don't in Finnish: >>> raise StandardError(u'Väärä tyyppi') Traceback (most recent call last): File "", line 1, in ? StandardError>>> >>> Any solution