Where can I find good python code?
vasudevram at gmail.com
Sun Oct 15 18:32:18 CEST 2006
Chris Lambacher wrote:
> On Sat, Oct 14, 2006 at 01:08:37AM +0900, js wrote:
> > Hi,
> > I've learned basics of Python and want to go to the next step.
> > So I'm looking for good python examples
> > I steal good techniques from.
> > I found Python distribution itself contains some examples in Demo directory.
> > I spent some time to read them and
> > I think they're good but seemed not so practical to me.
> > Any recommendations?
> A large portion of the standard library is pure python and of high
> quality(thats how it made it there in the first place). The newer a module is
> to the library, the better it will conform to current best practices.
> On Unix environments you can find the standard library in
> $PREFIX/lib/python$VERSION/ where $PREFIX is often /usr but sometimes
> /usr/local and version is the version you have installed (maybe 2.4 or 2.5?)
> On Windows you can find the standard library in c:\Python%VERSION%\Lib where
> %VERSION% is the version you installed (maybe 24 or 25?)
Try reading the code in this package:
Not very idiomatic or Pythonic code (done when I was still fairly new
to Python), but clear, well-commented - IMO, of course.
Also it is a real-world, though small, app, with both end-user tools
and a developer API.
So you can play around with using and extending it, etc. - and its easy
to understand too.
Might help motivate the learning if you try to build something useful
with it :-)
Software training and consulting
Dancing Bison Enterprises
More information about the Python-list