By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,660 Members | 1,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,660 IT Pros & Developers. It's quick & easy.

Convert Perl to Python

P: n/a
How can I convert a perl script to Python?

Thank you!
Dec 29 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
In <ma***************************************@python. org>,
Χρυσάνθη Αϊναλή wrote:
How can I convert a perl script to Python?
Look what the Perl script does and then rewrite it in Python. Automatic
translations between programming languages, if possible, usually result in
code that is not supposed to be read by human beings. Every language has
its idioms and a "literal" translation looks very odd to "native speakers"
of the target language.

Ciao,
Marc 'BlackJack' Rintsch
Dec 29 '06 #2

P: n/a
Marc 'BlackJack' Rintsch wrote:
In <ma***************************************@python. org>,
Χρυσάνθη Αϊναλή wrote:
>How can I convert a perl script to Python?

Look what the Perl script does and then rewrite it in Python. Automatic
translations between programming languages, if possible, usually result in
code that is not supposed to be read by human beings. Every language has
its idioms and a "literal" translation looks very odd to "native speakers"
of the target language.

Ciao,
Marc 'BlackJack' Rintsch

Either that or write a perl interpreter in python ;)

--
----------------------------------------------------------------------------
Tim Daneliuk tu****@tundraware.com
PGP Key: http://www.tundraware.com/PGP/
Dec 29 '06 #3

P: n/a
Marc 'BlackJack' Rintsch a écrit :
In <ma***************************************@python. org>,
Χρυσάνθη Αϊναλή wrote:

>>How can I convert a perl script to Python?


Look what the Perl script does and then rewrite it in Python. Automatic
translations between programming languages, if possible, usually result in
code that is not supposed to be read by human beings. Every language has
its idioms and a "literal" translation looks very odd to "native speakers"
of the target language.
and might be quite inefficient too...

Jan 2 '07 #4

P: n/a
pyperl - Perl for Python
------------------------
"This is a Python extension module that makes it possible to embed Perl
interpreter(s) in any Python program. It can be used to invoke
arbitrary Perl code, load any Perl modules and make calls directly
into Perl functions. The Perl code invoked can call back into Python
as it see fit."
http://wiki.python.org/moin/PyPerl
At least, a pacific coexistence between Python and Perl.

Jan 4 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.