perl to python

Ville Vainio ville at spammers.com
Thu May 13 01:37:00 EDT 2004


>>>>> "Chris" == Hornberger, Chris <Chris.Hornberger at blackrock.com> writes:

    Chris> Why bother with getting perl code translated into python
    Chris> code?

Because Python code is more readable and maintainable. That is a huge
win in multi-maintainer situations (which is typical in production
code). You can also bump up the functionality of the script while
porting, and get better reuse.

Porting perl code to Python is always very easy. Perl doesn't really
do anything that isn't as easy to express in Python.

    Chris> Perl is probably one of the best string manipulation and
    Chris> RegEx processors ever.

Yes, and so is Python. There have been several requests of examples
where Perl does a better job at string manipulation/regexp processing
than Python, and none have been presented. Perl regexps might execute
slightly faster, but that is hardly a winning argument.

    Chris> They don't have to overlap. With Python's pipe handling

But they do. Perl and Python completely overlap, to the extent car
("horseless carriage") and a horsefull variant of the carriage
overlap.

    Chris> there's little reason not to simply leave the perl code
    Chris> where it is and run it from an orchestration script in
    Chris> Python.

If the perl script is "complete" already, with no need to implement
extra functionality ever, that is probably ok. Then you can think of
the code as almost an executable third party binary, and have no
responsibilities or attachment regarding the source code.


-- 
Ville Vainio   http://tinyurl.com/2prnb



More information about the Python-list mailing list