The Python version of the Translation Project robot

François Pinard pinard at iro.umontreal.ca
Wed Oct 6 11:51:05 EDT 1999


Hi, people.

A few weeks ago, while walking my first Python steps, we were comparing
the speed of Perl and Python, and some of you wanted to peek at my code.
I put the last piece of the puzzle into production yesterday, and it now
makes more sense to give references:

   http://www.iro.umontreal.ca/contrib/po/bin/tp-robot
   http://www.iro.umontreal.ca/contrib/po/bin/po-register
   http://www.iro.umontreal.ca/contrib/po/lib/python/*.py

There are also a few other small Python tools in .../bin/, and maybe two
remaining scripts still in Perl -- I will convert them later.  I observed
the slowness after having converted:
   http://www.iro.umontreal.ca/contrib/po/lib/perl/File.pm
into:
   http://www.iro.umontreal.ca/contrib/po/lib/python/po.py
by executing the tool:
   http://www.iro.umontreal.ca/contrib/po/bin/po-normalize
on some bigger PO files from the central PO archives.

After a few weeks of Python work, I've grown up enough to see _a lot_ of
things that I can improve on my own, both at the sentence detail level and at
the overall global structuring.  This is currently Perl written in Python.
I did not really start Pythonishing the style yet.  Also, I will revisit
the above code for various reasons, so it is meant to clean up over time.
Be sure I do know there is a myriad of things that need to be attended.

Your criticism is welcome, of course.  Please do not exhaust yourself at
listing out every tiny detail that you see that could be improved, unless
you really feel like it (I guess it may be a healthy exercise to bang on
a different head, once in a while! :-)

                                                Keep happy!

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list