New to Python, familiar with Perl - Seeking info sources
bdesth.quelquechose at free.quelquepart.fr
Thu Jul 24 21:18:36 CEST 2008
Brett Ritter a écrit :
> After many years happily coding Perl, I'm looking to expand my
> horizons. [no flames please, I'm pretty aware of Perl's strengths and
> weaknesses and I'm just here to learn more, not to enter religious
> I've gone through some of the online tutorials and I'll be browsing
> the reference before starting the "code a lot" phase.
> My question is: What are the best sources to learn best practices or
> get the answers to questions? Are there any good sources to tell me
> what Perl habits are good/bad in the Python paradigm? What about
> common packages that will change my life? (I do a lot of web work,
> but also a lot of DB reporting)
wrt/ "best practices" and writing pythonic code, the best thing to do is
probably to lurk here and post code snippets asking for code reviews (we
just *love* that !-)
Others already pointed you to useful readings like diveintopython. I'd
like to add Fredrik Lundh (aka the effbot)'s excellent website to the list:
wrt/ packages, first take time to read the stdlib's package index - I've
a couple time Reinvented The Square Wheel(tm) when a well-rounded one
was just an import away. You'll also find useful resources on pypi (the
Python's Package Index).
> I'm also working as a Java developer
> primarily, so I'm glad to see that Jython has been resurrected, but
> I'm focusing on vanilla Python for the moment.
> As examples: PerlMonks has been my info source. The Perl Best
> Practices and Higher Order Perl books have been my tutors into better
> coding practices.
This newsgroup, diveintopython, effbot.org...
> CPAN has my life easy,
Not quite close to CPAN, but the closest we actually have IMHO: pypi
(for the package index) and easy_install.
> giving me access to the DBI,
> Class::DBI (and its successors),
low-level : Python db-api
hi-level : SQLAlchemy
Don't know what this one do...
cgi and wsgi...
> and Text::CSV::Simple modules
You probably want the csv package (in the stdlib).
You may also want to have a look at templating engines like Mako or Genshi.
> that are staples of my coding. The (occasionally complete) Perl
> Advent calendars have proven to be a good source to learn about
> helpful modules that I might not otherwise stumble across.
> (I've encountered Django, but I'm getting my fill of "frameworks" from
> Java for the moment, so I'm looking for lightweight pieces at the
While not exactly lighweight by Python's standards, Django is certainly
way lighter than the usual Java web framework. But Python is known to
have more web frameworks than keywords, so you may find something
lightweight enough for your taste - or of course write your own !-)
More information about the Python-list