New to Python, familiar with Perl - Seeking info sources

Discussion in 'Python' started by Brett Ritter, Jul 24, 2008.

  1. Brett Ritter

    Brett Ritter Guest

    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::DBI (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.
    Brett Ritter, Jul 24, 2008
    #1
    1. Advertising

  2. Brett Ritter

    Guest

    On Jul 24, 3:53 pm, Brett Ritter <> 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::DBI (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 :)
    , Jul 24, 2008
    #2
    1. Advertising

  3. Brett Ritter

    alex23 Guest

    On Jul 24, 11:53 pm, Brett Ritter <> 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/
    alex23, Jul 24, 2008
    #3

  4. > -----Original Message-----
    > From: python-list-bounces+jr9445= [mailto:python-
    > list-bounces+jr9445=] On Behalf Of Brett Ritter
    > Sent: Thursday, July 24, 2008 9:54 AM
    > To:
    > 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.
    Reedick, Andrew, Jul 24, 2008
    #4
  5. 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::DBI (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 !-)
    Bruno Desthuilliers, Jul 24, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Peters

    Re: Anyone familiar with TAR_DLY?

    Andy Peters, Nov 18, 2005, in forum: VHDL
    Replies:
    1
    Views:
    485
    Kai Harrekilde-Petersen
    Nov 18, 2005
  2. Leveridge Systems INC
    Replies:
    1
    Views:
    340
    =?Utf-8?B?TGVubg==?=
    Oct 21, 2004
  3. jens Jensen
    Replies:
    0
    Views:
    391
    jens Jensen
    Feb 17, 2006
  4. 7rans
    Replies:
    3
    Views:
    109
    Matt Todd
    Aug 4, 2006
  5. Sebastian
    Replies:
    3
    Views:
    544
    Sebastian
    Dec 19, 2012
Loading...

Share This Page