Automated Perl to Python translation?

Discussion in 'Python' started by Stephen Ferg, Sep 4, 2004.

  1. Stephen Ferg

    Stephen Ferg Guest

    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?
     
    Stephen Ferg, Sep 4, 2004
    #1
    1. Advertising

  2. Stephen Ferg

    yaipa h. Guest

    (Stephen Ferg) wrote in message news:<>...
    > 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.
     
    yaipa h., Sep 6, 2004
    #2
    1. Advertising

  3. (Stephen Ferg) wrote in message news:<>...
    > 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/atlantibots/pythonutils.html
     
    Michael Foord, Sep 6, 2004
    #3
  4. Stephen Ferg

    Maurice LING Guest

    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
     
    Maurice LING, Sep 7, 2004
    #4
  5. Stephen Ferg

    Aahz Guest

    In article <>,
    yaipa h. <> wrote:
    >
    >don't know but there is a book out.
    > Perl to Python Migration
    > by Martin C. Brown


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

    "A foolish consistency is the hobgoblin of little minds, adored by little
    statesmen and philosophers and divines." --Ralph Waldo Emerson
     
    Aahz, Sep 7, 2004
    #5
  6. 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 ;)
     
    gabriele renzi, Sep 7, 2004
    #6
  7. Stephen Ferg

    John J. Lee Guest

    > 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 <> 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
     
    John J. Lee, Sep 8, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TSO
    Replies:
    2
    Views:
    371
    Michele Simionato
    Apr 2, 2005
  2. Scotter
    Replies:
    5
    Views:
    132
    rob^_^
    Feb 25, 2008
  3. Replies:
    4
    Views:
    293
    Larry
    Feb 18, 2007
  4. Graham Feeley

    Perl Script to be automated

    Graham Feeley, Jul 5, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    236
    Graham Feeley
    Jul 6, 2008
  5. banzai

    loops in perl automated ftp

    banzai, Jan 8, 2009, in forum: Perl Misc
    Replies:
    9
    Views:
    431
    Ted Zlatanov
    Jan 13, 2009
Loading...

Share This Page