Perl -> Python hopeless?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Helmut Jarausch

    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

  • Max Khesin

    #2
    Re: Perl -> Python hopeless?

    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 -
    max@cNvOiSsPiAo Mntech.com
    [check out our image compression software at www.cvisiontech.com, JBIG2-PDF
    compression @
    Foxit Software is the reliable source for fast, affordable, & secure PDF software. From editor to eSign tools and more, we have what your business needs.



    "Helmut Jarausch" <jarausch@skyne t.be> wrote in message
    news:3f182c9a$0 $276$ba620e4c@r eader0.news.sky net.be...[color=blue]
    > 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
    >[/color]


    Comment

    • Mike Rovner

      #3
      Re: Perl -&gt; Python hopeless?

      "Helmut Jarausch" <jarausch@skyne t.be> wrote in message news:3f182c9a$0 $276
      [color=blue]
      > having been a Perl fan for years I have nearly converted to Python.[/color]

      I went the same way, happy with python now and never looked back.
      [color=blue]
      > 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?[/color]

      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




      Comment

      • Hartmut Goebel

        #4
        Re: Perl -&gt; Python hopeless?

        Helmut Jarausch schrieb:
        [color=blue]
        > Is there a tool to lesson the burdon of translation of Perl to Python?[/color]

        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 |
        | [email protected] | www.goebel-consult.de |

        Comment

        Working...