Does there exist a Python-to-Perl translator ?
tim at vegeta.ath.cx
Thu Sep 27 12:19:40 CEST 2001
Me parece que Weet Vanniks <No at Spam.Please> dijo:
> This would help me produce Perl code after developing it in Python.
> Thanks to all for answering.
Whatever for? If you have to produce Perl code, why don't you write it?
Otherwise, what have the thousands of Perl programmers spent months
learning it for?
(Besides, if no one had to learn Perl, O'Reilly and Associates would
lose 60% of their sales...) <wink>
OTOH, Perl 6's internals (codename: Parrot, ironically) may be your
answer. In theory (and not anywhere near done), Perl and Python would
both compile to a common bytecode, executable by the same VM. With that
in place, some have speculated on the ability to compile Python code to
Parrot bytecode, then spewing out equivalent Perl code. See Eric
Raymond's article here:
This may very well be what you're looking for, but don't count on it
producing optimized code, and especially not pretty code. Besides, Perl
6 isn't even due out for another few years, and Perl 6 will have a
significantly different syntax than Perl 5.
You might just have to learn Perl after all. <wink>
Please, no flames from over-zealous Pythonistas. Whether I know Perl or
not, I still spend 70% of my time programming at the '>>>' prompt or
with '#!/usr/local/bin/python' at the top of the buffer.
How do I type "for i in *.dvi do xdvi i done" in a GUI?
-- discussion in comp.os.linux.misc
More information about the Python-list