Professional quality scripts/code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • robean

    Professional quality scripts/code

    I have been learning Python for the last 3 months or so and I have a
    working (but somewhat patchy) sense of the the language. I've been
    using a couple of the more popular Python books as well as online
    resources.

    A question for experienced Python programmers: can you recommend
    resources where I can look at high quality Python code and scripts?
    I've spent some time at http://code.activestate.com/recipes/ but am
    concerned that the quality of what is posted there can be somewhat hit
    and miss. What I have in mind is a site like cpan, where one can look
    at the actual source code of many of the modules and learn a thing or
    two about idiomatic Perl programming from studying the better ones.
    Any sites like that for Python? (You can of course look up Python
    modules on docs.python.org , but, as far as I can tell, not the actual
    source code). Many thanks.




  • Mike Driscoll

    #2
    Re: Professional quality scripts/code

    On Oct 2, 3:38 pm, robean <st1...@gmail.c omwrote:
    I have been learning Python for the last 3 months or so and I have a
    working (but somewhat patchy) sense of the the language. I've been
    using a couple of the more popular Python books as well as online
    resources.
    >
    A question for experienced Python programmers: can you recommend
    resources where I can look at high quality Python code and scripts?
    I've spent some time athttp://code.activestat e.com/recipes/but am
    concerned that the quality of what is posted there can be somewhat hit
    and miss.  What I have in mind is a site like cpan, where one can look
    at the actual source code of many of the modules and learn a thing or
    two about idiomatic Perl programming from studying the better ones.
    Any sites like that for Python? (You can of course look up Python
    modules on docs.python.org , but, as far as I can tell, not the actual
    source code). Many thanks.

    You can look at any of the standard module's source code in your Lib
    directory including any 3rd party modules you've downloaded. You could
    also browse SourceForge or Google Code.

    Mike

    Comment

    • robean

      #3
      Re: Professional quality scripts/code

      On Oct 3, 1:26 am, Bruno Desthuilliers <bruno.
      42.desthuilli.. .@websiteburo.i nvalidwrote:
      robean a crit :
      >
      I have been learning Python for the last 3 months or so and I have a
      working (but somewhat patchy) sense of the the language. I've been
      using a couple of the more popular Python books as well as online
      resources.
      >
      A question for experienced Python programmers: can you recommend
      resources where I can look at high quality Python code and scripts?
      >
      Well... Not everything is 'high quality' in it[1], but why not start
      with the stdlib ? Most of it is pure Python, opensource code and is
      already installed on your machine, isn't it ?-)
      >
      [1] IIRC, last time I had a look at the zipfile module's code, it was
      more of a Q&D hack than anything else - now as long as it works fine for
      what I do with it and I don't have to maintain it, well, that's fine.
      >
      I've spent some time athttp://code.activestat e.com/recipes/but am
      concerned that the quality of what is posted there can be somewhat hit
      and miss.
      >
      Indeed.
      >
       What I have in mind is a site like cpan, where one can look
      at the actual source code of many of the modules and learn a thing or
      two about idiomatic Perl programming from studying the better ones.
      Any sites like that for Python?
      >
      Lurking here is probably a good way to see a lot of code reviews. And
      even possibly to submit snippets of your own code to review. Some (if
      not most) of us here like to show how good we are at improving the poor
      newbies code !-)
      Many thanks, Mike and Bruno,

      The resources you mention are exactly the kind of stuff I was looking
      for. Soon enough I hope to give all of you many chances to improve
      this poor newbie's code...!

      - Robean

      Comment

      • Bruno Desthuilliers

        #4
        Re: Professional quality scripts/code

        robean a écrit :
        I have been learning Python for the last 3 months or so and I have a
        working (but somewhat patchy) sense of the the language. I've been
        using a couple of the more popular Python books as well as online
        resources.
        >
        A question for experienced Python programmers: can you recommend
        resources where I can look at high quality Python code and scripts?
        Well... Not everything is 'high quality' in it[1], but why not start
        with the stdlib ? Most of it is pure Python, opensource code and is
        already installed on your machine, isn't it ?-)

        [1] IIRC, last time I had a look at the zipfile module's code, it was
        more of a Q&D hack than anything else - now as long as it works fine for
        what I do with it and I don't have to maintain it, well, that's fine.
        I've spent some time at http://code.activestate.com/recipes/ but am
        concerned that the quality of what is posted there can be somewhat hit
        and miss.
        Indeed.
        What I have in mind is a site like cpan, where one can look
        at the actual source code of many of the modules and learn a thing or
        two about idiomatic Perl programming from studying the better ones.
        Any sites like that for Python?
        Lurking here is probably a good way to see a lot of code reviews. And
        even possibly to submit snippets of your own code to review. Some (if
        not most) of us here like to show how good we are at improving the poor
        newbies code !-)

        Comment

        Working...