Does there exist a Python-to-Perl translator ?

Quinn Dunkan quinn at seniti.ugcs.caltech.edu
Mon Oct 1 21:42:19 CEST 2001


On Thu, 27 Sep 2001 14:03:36 +0200, Weet Vanniks <No at Spam.Please> wrote:
>You don't get my point. Managers do want to see Perl code. What I want is
>benefit from the productivity of Python, get something working and then
>satisfy my manageer with a Perl solution.

#!/usr/local/bin/perl
system("python foo.py");

Or you could embed python in perl and write a .xs, so you could type:

#!/usr/local/bin/perl
python->run(snag_the_stuff_after__END__); # or however you do this in perl,
# I've forgotten all of it

__END__
special dialect of perl follows...

EOF

Or if he just likes those .pl endings, you can use imputils and rename your
python scripts.  Or use Gordon's packaging utilities, and deliver a big wad of
binary.  If there were a python-to-perl, the perl it generated would be just
as readable as the binary.



More information about the Python-list mailing list