473,406 Members | 2,336 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Perl -> Python hopeless?

Hi,
having been a Perl fan for years I have nearly converted to Python.
Still, there are LOTS and very good modules written in Perl.

Is there a tool to lesson the burdon of translation of Perl to Python?
I am completely aware of the fact that a fully automatic translation
to readable Python source is hard if not impossible.
But such a tool could lots of the tedious work like replacing
braces by proper indentation and and similar things.

Thanks for a pointer (if there is one)

--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany

Jul 18 '05 #1
3 2182
Answer: I think they are working on somethig that will allow perl lib usage
in python.
Question: Can someone in the know drop a line?

--
========================================
Max Khesin, software developer -
ma*@cNvOiSsPiAoMntech.com
[check out our image compression software at www.cvisiontech.com, JBIG2-PDF
compression @
www.cvisiontech.com/cvistapdf.html]
"Helmut Jarausch" <ja******@skynet.be> wrote in message
news:3f*********************@reader0.news.skynet.b e...
Hi,
having been a Perl fan for years I have nearly converted to Python.
Still, there are LOTS and very good modules written in Perl.

Is there a tool to lesson the burdon of translation of Perl to Python?
I am completely aware of the fact that a fully automatic translation
to readable Python source is hard if not impossible.
But such a tool could lots of the tedious work like replacing
braces by proper indentation and and similar things.

Thanks for a pointer (if there is one)

--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany

Jul 18 '05 #2
"Helmut Jarausch" <ja******@skynet.be> wrote in message news:3f182c9a$0$276
having been a Perl fan for years I have nearly converted to Python.
I went the same way, happy with python now and never looked back.
Still, there are LOTS and very good modules written in Perl.
Is there a tool to lesson the burdon of translation of Perl to Python?


IMHO language differences leads to different style and I found that
rewriting is better than semi-automatic translation.

I had a project first implemented in perl, than rewrote in python.
Some idioms are completely different, for ex. code blocks in perl are
natural, classes are not.
OTOH classes are natural in python and no unnamed code blocks exists.
The list may be continued on and on.

Just .02

Mike


Jul 18 '05 #3
Helmut Jarausch schrieb:
Is there a tool to lesson the burdon of translation of Perl to Python?


You may try bridgekeeper (http://www.crazy-compilers.com/bridgekeeper/).
But typically it' better to completly rewrite the code since Python
offers different features.

Regards
Hartmut Goebel
--
| Hartmut Goebel | IT-Security -- effizient |
| h.******@goebel-consult.de | www.goebel-consult.de |

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mark Wilson CPU | last post by:
This must be easy, but I'm missing something... I want to execute a Perl script, and capture ALL its output into a PHP variable. Here are my 2 files: -------------------------------------...
3
by: David F. Skoll | last post by:
Hi, I'm tearing my hair out on this one. I'm trying to embed a Perl interpreter into a C program. I need to be able to create and destroy the interpreter periodically, but will never actually...
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
13
by: Otto J. Makela | last post by:
I'm trying to install to php the Perl-1.0.0.tgz package (from http://pecl.php.net/package/perl, enabling one to call perl libraries) to a pre-existing Solaris system. Unfortunately, the attempt...
6
by: surfivor | last post by:
I may be involved in a data migration project involving databases and creating XML feeds. Our site is PHP based, so I imagine the team might suggest PHP, but I had a look at the PHP documentation...
4
by: billb | last post by:
I installed a perl extension for PHP to use some perl inside my php primarily because I have perl working with oracle and not php and oracle. So I want to use my old perl scripts, and use the...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.