top | item 4435751

Best Open Python Books

229 points| kenneth_reitz | 13 years ago |pythonbooks.revolunet.com

31 comments

order
[+] simonw|13 years ago|reply
I'm a big fan of Text Processing In Python, which has excellent chapters on a bunch of topics including regular expressions, parsers and even compression algorithms. It's available online (from the author's own website) here: http://gnosis.cx/TPiP/
[+] JulianWasTaken|13 years ago|reply
So, just for a bit of (opinionated) guidance, since the question of "What book should I read to learn Python itself" will never go away, if you are a beginner, I would recommend Zed Shaw's book there, or if you try it and don't like its style (or want to compliment it), then Downey's How to Think Like a Computer Scientist is also pretty good.

If you're already coming from some other language, or would classify yourself as something other than a beginner, the best resource is the official tutorial (http://docs.python.org/tut), which isn't listed on that list.

Also since it comes up so often, Dive Into Python is not a resource that I would recommend. From what I've seen, Google's video series is mediocre, and an OK intro if books are not for you. The recent Udacity course hasn't been too great from the small samples I've seen from it either, but I can't say that's enough to say "skip it" conclusively. I also was recently made aware of KOANS for Python (https://github.com/gregmalcolm/python_koans) which, though I haven't gone through it, I'd very much agree with ideologically as a good beginner's resource to complement a book.

[+] zedshaw|13 years ago|reply
I agree with this, but I'll throw out one other way to learn Python if you already know a programming language:

1. Blast through just about any book and type in all the code getting it all to run. DO NOT just read the book. Coders constantly equate "I read about it" with "I can do it".

2. Go to any web framework that has a decent tutorial and build whatever they have you build. If web isn't your thing then find your thing and do that.

3. Pick a random thing (website, game, log parser) and try to replicate a small version of it.

4. Then try writing all the major algorithms in that language. Linked Lists, Arrays, Hashmaps, Binary Trees, string search and some hashing at a minimum.

That'll get you up to speed in the language quick, assuming you already know a couple of other ones.

[+] MengYuanLong|13 years ago|reply
Zed Shaws's Learn Python the Hardway is a wonderful introduction to Python and because it is very concise, it makes for a handy review resource as well. There are a few portions that I recall were a bit confusing but Zed does a great job of monitoring the comments and giving extra help when necessary.

Likewise, the Django tutorial throws you off the deep end but working through it twice gives a good overview of how the different pieces tie together.

I must second JulianWasTaken's dislike of Dive Into Python. I tried working through the book but had trouble integrating the information and recalling code discussed in previous chapters.

All that said, I think the most important thing to remember when learning any subject is to find what works for you. Start with a recommended source but if it isn't working, don't be afraid to try a different source or style.

[+] jtreminio|13 years ago|reply
Would you expand on why you think Dive Into Python isn't a good resource? Many of the online reviews I'm reading state the contrary.
[+] greenonion|13 years ago|reply
Any idea why The Django Book (http://www.djangobook.com/) is not on the list? It seems to be the go-to Django beginner's book for many people.
[+] brntn|13 years ago|reply
The Django Book, though great, is ridiculously out of date - the print version is written for Django 0.96, the incomplete web version is for Django 1.0, and Django 1.4 was just released.

It's a great resource, and was very useful to myself when learning Django back in the day, but the regular Django docs have far surpassed it on my made up usefulness scale.

[+] bangbang|13 years ago|reply
Learning Python by Mark Lutz is worth a mention for those who want to understand the "why" as well as the "how".
[+] sputnikus|13 years ago|reply
But Learning Python isn't free, is it?
[+] emmelaich|13 years ago|reply
I would add the Python Cookbook. Technically the book is not free but all the code is available at ActiveState.
[+] gjkood|13 years ago|reply
Thank you. Nice to have them in one place and free at the same time.