Python noob SOS (any [former?] Perlheads out there?)

Reedick, Andrew jr9445 at ATT.COM
Tue Jan 29 12:26:30 EST 2008


> -----Original Message-----
> From: python-list-bounces+jr9445=att.com at python.org [mailto:python-
> list-bounces+jr9445=att.com at python.org] On Behalf Of kj
> Sent: Tuesday, January 29, 2008 11:39 AM
> To: python-list at python.org
> Subject: Python noob SOS (any [former?] Perlheads out there?)
> 
> 
> 
> For many months now I've been trying to learn Python, but I guess
> I'm too old a dog trying to learn new tricks...  For better or
> worse, I'm so used to Perl when it comes to scripting, that I'm
> just having a very hard time getting a hang of "The Python Way."
> 
> It's not the Python syntax that I'm having problems with, but rather
> with larger scale issues such as the structuring of packages,
> techniques for code reuse, test suites, the structure of
> distributions,...  Python and Perl seem to come from different
> galaxies altogether...


It sound like less of a "How to do Things the Python Way" problem, a
more of a "How to do Object Oriented Programming" problem.
 
Coming from a C++/Perl background, I found the O'Reilly 'Learning
Python' book to be useful.  It has a section on OOP, which covers basic
OO theory that you may find useful.  I can't think of a decent OO book
to recommend though.  


> Be that as it may, the activation barrier to using Python for my
> scripting remains too high.
> 
> I'd written a Perl module to facilitate the writing of scripts.
> It contained all my boilerplate code for parsing and validating
> command-line options, generating of accessor functions for these
> options, printing of the help message and of the full documentation,
> testing, etc.

Bleh.  Perl and Python have really good libraries.  Why waste time
rolling your own when you can use Python's getopt or optparse, or Perl's
Getopt and Getopt::Long?





More information about the Python-list mailing list