Python system with exemplary organization/coding style

Discussion in 'Python' started by TomF, May 15, 2009.

  1. TomF

    TomF Guest

    I'm looking for a medium-sized Python system with very good coding
    style and good code organization, so I can learn from it. I'm reading
    various books on Python with advice on such things but I'd prefer to
    see a real system.

    By medium-sized I mean 5-20 classes, 5-20 files, etc; a code base that
    has some complexity but isn't overwhelming.

    Thanks,
    -Tom
     
    TomF, May 15, 2009
    #1
    1. Advertisements

  2. TomF

    CTO Guest

    I'd recommend screenlets. Good documentation and pretty good style,
    and
    they have some external dependencies so you can see how that operates,
    and of course you can see what your code is and isn't doing pretty
    quickly.

    <URL: http://www.screenlets.org>

    Geremy Condra
     
    CTO, May 15, 2009
    #2
    1. Advertisements

  3. TomF

    TomF Guest

    Thanks, this does look pretty good. Too bad it's grapics oriented, but
    I suppose I can filter out the graphics dependencies.

    -Tom
     
    TomF, May 16, 2009
    #3
  4. TomF

    Aahz Guest

    Actually, that's what I'd call "small". "Medium" would be about 30-50
    classes (Python mostly has multiple classes per file, unlike Java, so
    number of files is usally a poor measure of complexity). Something about
    the right complexity level for what you're looking for can be found in
    several parts of the Python standard library, including the thread,
    threading, and Queue modules (although I haven't looked at the code
    recently, so I can't vouch for its quality).

    Another option would be dnspython, but that's getting a bit larger than
    you're looking for.
    --
    Aahz () <*> http://www.pythoncraft.com/

    "In 1968 it took the computing power of 2 C-64's to fly a rocket to the moon.
    Now, in 1998 it takes the Power of a Pentium 200 to run Microsoft Windows 98.
    Something must have gone wrong." --/bin/fortune
     
    Aahz, May 16, 2009
    #4
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.