470,841 Members | 1,177 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,841 developers. It's quick & easy.

Python for Perl programmers

A.M
Hi,

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

Thank you,

Alan
May 4 '06 #1
9 1491
In article <Xx*******************@news20.bellglobal.com>,
A.M <al******@newsgroup.nospam> wrote:

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


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 (aa**@pythoncraft.com) <*> http://www.pythoncraft.com/

"Argue for your limitations, and sure enough they're yours." --Richard Bach
May 4 '06 #2
"A.M" <al******@newsgroup.nospam> writes:
Is there any efficient online resource or book that help experienced Perl
programmers to Python?


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

May 4 '06 #3
I found this version of the phrasebook:
http://wiki.python.org/moin/PerlPhrasebook
its been edited recently but I didn't check for how current it is.

-- Pad.

May 4 '06 #4

On May 4, 2006, at 12:36 PM, Aahz wrote:
In article <Xx*******************@news20.bellglobal.com>,
A.M <al******@newsgroup.nospam> wrote:

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


I'd recommend http://www.diveintopython.org since you know how to
program already. It's free!
---
Andrew Gwozdziewycz
ap****@gmail.com
http://ihadagreatview.org
http://and.rovir.us
May 4 '06 #5
On Thu, May 04, 2006 at 12:02:52PM -0400, A.M wrote:
Is there any efficient online resource or book that help experienced Perl
programmers to Python?


I've been using Perl for a decade and had a hard start into Python. Mainly
because I used those "phrasebooks" 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
May 5 '06 #6
A.M wrote:
Hi,

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


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 'o****@xiludom.gro'.split('@')])"
May 5 '06 #7
Am Thu, 04 May 2006 12:02:52 -0400 schrieb A.M:
Hi,

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


You can try the examples of pleac:

http://pleac.sourceforge.net/pleac_python/index.html

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: ni**************@thomas-guettler.de

May 5 '06 #8
John J. Lee <jj*@pobox.com> wrote:
"A.M" <al******@newsgroup.nospam> writes:
Is there any efficient online resource or book that help experienced Perl
programmers to Python?


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


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
May 5 '06 #9
al*****@yahoo.com (Alex Martelli) writes:
John J. Lee <jj*@pobox.com> wrote:
"A.M" <al******@newsgroup.nospam> writes:
Is there any efficient online resource or book that help experienced Perl
programmers to Python?


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


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).


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

May 5 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

220 posts views Thread by Brandon J. Van Every | last post: by
699 posts views Thread by mike420 | last post: by
226 posts views Thread by Stephen C. Waterbury | last post: by
17 posts views Thread by Michael McGarry | last post: by
31 posts views Thread by surfunbear | last post: by
68 posts views Thread by Lad | last post: by
82 posts views Thread by Edward Elliott | last post: by
6 posts views Thread by Dan Jacobson | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.