[Python-ideas] i18n and Python tracebacks

Nick Coghlan ncoghlan at gmail.com
Mon May 17 23:19:57 CEST 2010


Carl M. Johnson wrote:
> Couldn't this be done first as a simple module that wraps a try block
> around the interactive prompt and changes known error messages to
> their translated counterparts? It would probably make sense to see if
> there's any traction for the idea first that way before changing core
> Python.

It would actually be interesting to see just how far someone could get
purely with sys.excepthook.

It would be subject to some fairly significant limitations (particularly
when it comes to reparsing strings with interpolated values), but the
traceback parsing and comparison code in doctest may offer a good
starting point.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------



More information about the Python-ideas mailing list