doc/translator.py unified for Python 2.6+ and Python 3.0+

Hi Dimitri, 

I have done it differently than described in the letter. It seems to be simpler now and contains only few warts related to Python 2.

Have a nice day,
Petr