Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > New to Python, familiar with Perl - Seeking info sources

Reply
Thread Tools

New to Python, familiar with Perl - Seeking info sources

 
 
Brett Ritter
Guest
Posts: n/a
 
      07-24-2008
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
debates].

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) 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. CPAN has my life easy, giving me access to the DBI,
Class:BI (and its successors), HTML::FillInForm,
Data::FormValidator, CGI::Application, and Text::CSV::Simple modules
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
moment)

My (admittedly brief) searches here and on google didn't lead me to
any particular spots of concentrated Python info, and most of the Perl/
Python stuff is either a smug attack by one camp on the other or a
rant about the behavior of an obscure feature between the two.

Any recommendations? Thanks in advance.



 
Reply With Quote
 
 
 
 
cokofreedom@gmail.com
Guest
Posts: n/a
 
      07-24-2008
On Jul 24, 3:53 pm, Brett Ritter <(E-Mail Removed)> wrote:
> 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
> debates].
>
> 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) 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. CPAN has my life easy, giving me access to the DBI,
> Class:BI (and its successors), HTML::FillInForm,
> Data::FormValidator, CGI::Application, and Text::CSV::Simple modules
> 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
> moment)
>
> My (admittedly brief) searches here and on google didn't lead me to
> any particular spots of concentrated Python info, and most of the Perl/
> Python stuff is either a smug attack by one camp on the other or a
> rant about the behavior of an obscure feature between the two.
>
> Any recommendations? Thanks in advance.


Best start is a quick read of DiveIntoPython that provides a nice
account of how to work with Python, and relates to coming from a
programming background. I also keep this List on my bookmarks, as well
as the python library (http://docs.python.org//lib/).

The ActiveState Python Cookbook (http://aspn.activestate.com/ASPN/
Python/Cookbook/) generally has a lot of useful code snippets worth
using.

Zen of Python (http://www.python.org/dev/peps/pep-0020/) shows the
idea of Python and (http://www.python.org/dev/peps/pep-0008/) is the
Style Guidelines for Python code.

I haven't worked with the web and Python much yet so maybe someone
else can help you there. Welcome
 
Reply With Quote
 
 
 
 
alex23
Guest
Posts: n/a
 
      07-24-2008
On Jul 24, 11:53 pm, Brett Ritter <(E-Mail Removed)> wrote:
> My question is: What are the best sources to learn best practices or
> Are there any good sources to tell me
> what Perl habits are good/bad in the Python paradigm?


I've never used Perl myself, so I can't comment on the quality, but
this document was recommended earlier this week:
http://wiki.python.org/moin/PerlPhrasebook

> What about
> common packages that will change my life? (I do a lot of web work,
> but also a lot of DB reporting)


If you're not anti-ORM, I highly recommend checking out SQLAlchemy.
It's not part of the standard lib, but it's an amazing tool:
http://www.sqlalchemy.org/

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


You might appreciate Doug Hellman's Python Module of the Week blog:
http://www.doughellmann.com/projects/PyMOTW/

> (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
> moment)


The Web Services Gateway Interface (WSGI) was designed to promote the
building of web applications using interchangeable middleware. It's
definitely worth having an understanding of if you plan on developing
web apps in Python:
http://www.wsgi.org/wsgi/

If you're wanting to avoid the larger frameworks, check out CherryPy,
it's a thing of beauty:
http://www.cherrypy.org/
 
Reply With Quote
 
Reedick, Andrew
Guest
Posts: n/a
 
      07-24-2008


> -----Original Message-----
> From: python-list-bounces+jr9445=(E-Mail Removed) [mailtoython-
> list-bounces+jr9445=(E-Mail Removed)] On Behalf Of Brett Ritter
> Sent: Thursday, July 24, 2008 9:54 AM
> To: http://www.velocityreviews.com/forums/(E-Mail Removed)
> Subject: New to Python, familiar with Perl - Seeking info sources
>
> 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
> debates].
>

<snip>
>
> Any recommendations? Thanks in advance.
>


I have a Perl background and have found the O'Reilly books to be useful.
The Learning Python book (or whatever it's called) is good because it
covers the paradigm shifts and potential gotchas that you won't even
consider thinking about otherwise. Only downside is wading through the
novice 'how to program' parts. The Cookbook is also good for getting
'standard' apps up and running quickly (meaning you know how to do it in
Perl, and just need the equivalent Python syntax/paradigm.)

The Python help can be very hit or miss. You're going to have _fun_
with the Python regex module. *twitch*winch*sputter* Generally
speaking, there's a Python module to do just about everything you could
do in Perl. The only gap I've found is in the win32com with a class in
a .tlb file (works fine in Perl, fails in Python.) But someone on the
python-win32 list posted a potential workaround which I need to test.

The really spiffy part is that when I converted a few Perl scripts to
Python, the Python scripts were a bit smaller. =O Python does less
compile time type checking than Perl. And finally, this mailing list
does produce useful, polite answers about syntax to theory, despite some
noise.


 
Reply With Quote
 
Bruno Desthuilliers
Guest
Posts: n/a
 
      07-24-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
> debates].
>
> 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:
http://effbot.org/

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:BI (and its successors),


low-level : Python db-api
hi-level : SQLAlchemy

> HTML::FillInForm,


Don't know what this one do...

> Data::FormValidator,


FormEncode

> CGI::Application,


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.


python-announces ?

> (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
> moment)


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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seeking info on JAXB and custom annotations Sebastian Java 3 12-19-2012 06:23 PM
seeking convention: project directory for project info 7rans Ruby 3 08-04-2006 06:18 PM
Reporter seeking info... AtticusF Digital Photography 24 11-04-2004 06:02 PM
Seeking info on the "Fujifilm FinePixA204" Ablang Digital Photography 1 07-27-2004 05:29 AM
A Few Good Supplemental Sources for A+ Info P. Qwan A+ Certification 1 07-12-2004 07:07 PM



Advertisments