Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Automated Perl to Python translation?

Reply
Thread Tools

Automated Perl to Python translation?

 
 
Stephen Ferg
Guest
Posts: n/a
 
      09-04-2004
I need to translate some Perl scripts into Python.

When I went looking for a tool that would help automate the
translation, I was rather surprised that I couldn't find anything.
BridgeKeeper, the only real candidate that I could find, is no longer
available. There are of course general-purpose parsing packages, but
I'm looking for something target specifically to Perl-to-Python
translation.

Since I couldn't find anything, I've started to write my own.
Preliminary results are good, but before I spend any more time on it I
want to be really sure that I'm not re-inventing the wheel.

Does anybody know of any tools to automate (or assist) Perl to Python
translation?
 
Reply With Quote
 
 
 
 
yaipa h.
Guest
Posts: n/a
 
      09-06-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (Stephen Ferg) wrote in message news:<(E-Mail Removed). com>...
> I need to translate some Perl scripts into Python.
>
> When I went looking for a tool that would help automate the
> translation, I was rather surprised that I couldn't find anything.
> BridgeKeeper, the only real candidate that I could find, is no longer
> available. There are of course general-purpose parsing packages, but
> I'm looking for something target specifically to Perl-to-Python
> translation.
>
> Since I couldn't find anything, I've started to write my own.
> Preliminary results are good, but before I spend any more time on it I
> want to be really sure that I'm not re-inventing the wheel.
>
> Does anybody know of any tools to automate (or assist) Perl to Python
> translation?


don't know but there is a book out.
Perl to Python Migration
by Martin C. Brown

Cheers.
 
Reply With Quote
 
 
 
 
Michael Foord
Guest
Posts: n/a
 
      09-06-2004
(E-Mail Removed) (Stephen Ferg) wrote in message news:<(E-Mail Removed). com>...
> I need to translate some Perl scripts into Python.
>
> When I went looking for a tool that would help automate the
> translation, I was rather surprised that I couldn't find anything.
> BridgeKeeper, the only real candidate that I could find, is no longer
> available. There are of course general-purpose parsing packages, but
> I'm looking for something target specifically to Perl-to-Python
> translation.
>
> Since I couldn't find anything, I've started to write my own.
> Preliminary results are good, but before I spend any more time on it I
> want to be really sure that I'm not re-inventing the wheel.
>
> Does anybody know of any tools to automate (or assist) Perl to Python
> translation?


My goodness - sounds like quite a project. Now if you could make it
two way that would be really interesting...

Cool.

Fuzzy

http://www.voidspace.org.uk/atlantib...thonutils.html
 
Reply With Quote
 
Maurice LING
Guest
Posts: n/a
 
      09-07-2004
Stephen Ferg wrote:
> I need to translate some Perl scripts into Python.
>
> When I went looking for a tool that would help automate the
> translation, I was rather surprised that I couldn't find anything.
> BridgeKeeper, the only real candidate that I could find, is no longer
> available. There are of course general-purpose parsing packages, but
> I'm looking for something target specifically to Perl-to-Python
> translation.
>
> Since I couldn't find anything, I've started to write my own.
> Preliminary results are good, but before I spend any more time on it I
> want to be really sure that I'm not re-inventing the wheel.
>
> Does anybody know of any tools to automate (or assist) Perl to Python
> translation?


This is a great feat of worth I'll say. I remembered reading somewhere
that Jython uses JavaCC, so perhaps looking in that direction can be of
some help.

PLY is one of the pure python lex/yacc system I can find. There is also
SPARK, but John Aycock had left the university. PLY is partially based
on SPARK.

If this can be worked out, Perl/Python/Java combination is too powerful
to imagine......

Maurice
 
Reply With Quote
 
Aahz
Guest
Posts: n/a
 
      09-07-2004
In article <(E-Mail Removed) >,
yaipa h. <(E-Mail Removed)> wrote:
>
>don't know but there is a book out.
> Perl to Python Migration
> by Martin C. Brown


Not particularly useful.
--
Aahz ((E-Mail Removed)) <*> http://www.pythoncraft.com/

"A foolish consistency is the hobgoblin of little minds, adored by little
statesmen and philosophers and divines." --Ralph Waldo Emerson
 
Reply With Quote
 
gabriele renzi
Guest
Posts: n/a
 
      09-07-2004
Maurice LING ha scritto:


> If this can be worked out, Perl/Python/Java combination is too powerful
> to imagine......
>


I think you'd be happy with parrot or .net
 
Reply With Quote
 
John J. Lee
Guest
Posts: n/a
 
      09-07-2004
> Stephen Ferg wrote:
[...]
> Does anybody know of any tools to automate (or assist) Perl to Python
> translation?


Perl has a notoriously hairy lexical structure. Maybe the parsing
isn't much fun either. The "only perl can parse Perl" quote (Larry
Wall?) springs to mind. Given that, and working on the assumption
you're sufficiently insane to go through with this project <wink>, I
guess you'd definitely want to do precisely that: use perl to parse
the Perl code.

Bon chance.

[...]
Maurice LING <(E-Mail Removed)> writes:
> If this can be worked out, Perl/Python/Java combination is too
> powerful to imagine......


I don't think that's a reason for wanting a translator. If you
just want to call Python from Perl, or call Perl from Python, I guess
you'd use pyperl (though I don't know if it's actively maintained).


John
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
loops in perl automated ftp banzai Perl Misc 9 01-13-2009 03:49 PM
Perl Script to be automated Graham Feeley Perl Misc 4 07-06-2008 04:29 AM
Automated testing of cgi / perl spam@comjet.com Perl Misc 4 02-18-2007 04:00 PM
Automated Graph Plotting in Python diffuser78@gmail.com Python 7 04-10-2006 12:59 PM
Has anyone released a Python "mock filesystem" for automated testing? Peter Hansen Python 9 11-10-2004 01:50 PM



Advertisments