Python for Perl programmers

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • A.M

    #1

    Python for Perl programmers

    Hi,



    Is there any efficient online resource or book that help experienced Perl
    programmers to Python?



    Thank you,

    Alan


  • Aahz

    #2
    Re: Python for Perl programmers

    In article <Xxp6g.1766$VV2 .132570@news20. bellglobal.com> ,
    A.M <alanalan@newsg roup.nospam> wrote:[color=blue]
    >
    >Is there any efficient online resource or book that help experienced Perl
    >programmers to Python?[/color]

    Don't use the Martin Brown book, whatever you do. The Perl/Python
    Phrasebook isn't bad, but it's ten years out of date. Really, your best
    bet is to just dive into the Python tutorial.
    --
    Aahz (aahz@pythoncra ft.com) <*> http://www.pythoncraft.com/

    "Argue for your limitations, and sure enough they're yours." --Richard Bach

    Comment

    • John J. Lee

      #3
      Re: Python for Perl programmers

      "A.M" <alanalan@newsg roup.nospam> writes:
      [color=blue]
      > Is there any efficient online resource or book that help experienced Perl
      > programmers to Python?[/color]

      Worry instead about how you're going to keep maintaining your Perl
      code after you've developed an allergic response to it.

      <0.5 wink>


      John

      Comment

      • Paddy

        #4
        Re: Python for Perl programmers

        I found this version of the phrasebook:

        its been edited recently but I didn't check for how current it is.

        -- Pad.

        Comment

        • Andrew Gwozdziewycz

          #5
          Re: Python for Perl programmers


          On May 4, 2006, at 12:36 PM, Aahz wrote:
          [color=blue]
          > In article <Xxp6g.1766$VV2 .132570@news20. bellglobal.com> ,
          > A.M <alanalan@newsg roup.nospam> wrote:[color=green]
          >>
          >> Is there any efficient online resource or book that help
          >> experienced Perl
          >> programmers to Python?[/color][/color]

          I'd recommend http://www.diveintopython.org since you know how to
          program already. It's free!


          ---
          Andrew Gwozdziewycz
          apgwoz@gmail.co m




          Comment

          • Christoph Haas

            #6
            Re: Python for Perl programmers

            On Thu, May 04, 2006 at 12:02:52PM -0400, A.M wrote:[color=blue]
            > Is there any efficient online resource or book that help experienced Perl
            > programmers to Python?[/color]

            I've been using Perl for a decade and had a hard start into Python. Mainly
            because I used those "phrasebook s" and tried to convert my Perl syntax
            statement-by-statement. However Python doesn't just have another syntax but
            also other concepts. It's worth working yourself through the diveintopython
            tutorial. Or if you want to spend money I strongly recommend the book
            "Beginning Python: From Novice to Professional" (ISBN 159059519X) because
            you learn a lot about daily problems and gotchas, too.

            Besides from the "I'm cool because I'm the only one who can read my code"
            factor that Perl delivers Python has everything you need. :)

            Kindly
            Christoph

            Comment

            • bruno at modulix

              #7
              Re: Python for Perl programmers

              A.M wrote:[color=blue]
              > Hi,
              >
              > Is there any efficient online resource or book that help experienced Perl
              > programmers to Python?
              >[/color]

              My fellow coworker - experimented Perl coder - confirms that the
              official tutorial and diveintopython should be enough to get you
              started. Also, the Python Cookbook and reading this group may help you
              grasp pythonic idioms.

              --
              bruno desthuilliers
              python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
              p in 'onurb@xiludom. gro'.split('@')])"

              Comment

              • Thomas Guettler

                #8
                Re: Python for Perl programmers

                Am Thu, 04 May 2006 12:02:52 -0400 schrieb A.M:
                [color=blue]
                > Hi,
                >
                >
                >
                > Is there any efficient online resource or book that help experienced Perl
                > programmers to Python?[/color]

                You can try the examples of pleac:



                This is the Per Cookbook translated into several languages.

                Thomas

                --
                Thomas Güttler, http://www.thomas-guettler.de/
                E-Mail: guettli (*) thomas-guettler + de
                Spam Catcher: niemand.leerman n@thomas-guettler.de

                Comment

                • Alex Martelli

                  #9
                  Re: Python for Perl programmers

                  John J. Lee <jjl@pobox.co m> wrote:
                  [color=blue]
                  > "A.M" <alanalan@newsg roup.nospam> writes:
                  >[color=green]
                  > > Is there any efficient online resource or book that help experienced Perl
                  > > programmers to Python?[/color]
                  >
                  > Worry instead about how you're going to keep maintaining your Perl
                  > code after you've developed an allergic response to it.[/color]

                  Nah, that's easy -- you port it to Python (that's what I did back in the
                  day, and I've heard at least three others relate similar choices).


                  Alex

                  Comment

                  • John J. Lee

                    #10
                    Re: Python for Perl programmers

                    aleaxit@yahoo.c om (Alex Martelli) writes:
                    [color=blue]
                    > John J. Lee <jjl@pobox.co m> wrote:
                    >[color=green]
                    > > "A.M" <alanalan@newsg roup.nospam> writes:
                    > >[color=darkred]
                    > > > Is there any efficient online resource or book that help experienced Perl
                    > > > programmers to Python?[/color]
                    > >
                    > > Worry instead about how you're going to keep maintaining your Perl
                    > > code after you've developed an allergic response to it.[/color]
                    >
                    > Nah, that's easy -- you port it to Python (that's what I did back in the
                    > day, and I've heard at least three others relate similar choices).[/color]

                    Or, in my case, throwing away the Perl I had because I found I had
                    written something much more useful in Python.

                    A little bit of experience on a smallish (or largish!) from-scratch
                    Python project does of course make a difference: Perl and Python are
                    sufficiently close in many things that it's easy to get tunnel vision
                    when porting Perl to Python. A little knowledge of Python idioms,
                    techniques, standard library modules, etc., gained outside of that
                    narrow context, goes a long way to prevent that.

                    OTOH, the often-mechanical nature of porting .pl->.py, and the great
                    flexibility of both languages, does certainly make it easier to
                    switch.


                    John

                    Comment

                    Working...