Connecting Tech Pros Worldwide Forums | Help | Site Map

Automated Perl to Python translation?

Stephen Ferg
Guest
 
Posts: n/a
#1: Jul 18 '05
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?

yaipa h.
Guest
 
Posts: n/a
#2: Jul 18 '05

re: Automated Perl to Python translation?


steve@ferg.org (Stephen Ferg) wrote in message news:<b16e4ef7.0409040550.4432a70f@posting.google. com>...[color=blue]
> 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?[/color]

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

Cheers.
Michael Foord
Guest
 
Posts: n/a
#3: Jul 18 '05

re: Automated Perl to Python translation?


steve@ferg.org (Stephen Ferg) wrote in message news:<b16e4ef7.0409040550.4432a70f@posting.google. com>...[color=blue]
> 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?[/color]

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
Maurice LING
Guest
 
Posts: n/a
#4: Jul 18 '05

re: Automated Perl to Python translation?


Stephen Ferg wrote:[color=blue]
> 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?[/color]

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
Aahz
Guest
 
Posts: n/a
#5: Jul 18 '05

re: Automated Perl to Python translation?


In article <6e07b825.0409052154.7a654c12@posting.google.com >,
yaipa h. <yaipa@yahoo.com> wrote:[color=blue]
>
>don't know but there is a book out.
> Perl to Python Migration
> by Martin C. Brown[/color]

Not particularly useful.
--
Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/

"A foolish consistency is the hobgoblin of little minds, adored by little
statesmen and philosophers and divines." --Ralph Waldo Emerson
gabriele renzi
Guest
 
Posts: n/a
#6: Jul 18 '05

re: Automated Perl to Python translation?


Maurice LING ha scritto:

[color=blue]
> If this can be worked out, Perl/Python/Java combination is too powerful
> to imagine......
>[/color]

I think you'd be happy with parrot or .net ;)
John J. Lee
Guest
 
Posts: n/a
#7: Jul 18 '05

re: Automated Perl to Python translation?


> Stephen Ferg wrote:
[...][color=blue]
> Does anybody know of any tools to automate (or assist) Perl to Python
> translation?[/color]

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 <mauriceling@acm.org> writes:[color=blue]
> If this can be worked out, Perl/Python/Java combination is too
> powerful to imagine......[/color]

:-( 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
Closed Thread


Similar Python bytes