June 6, 2007

Learning resources for Python

I got a nice e-mail today from someone who is searching for good resources for learning python. I’m quoting the relevant part :

I wanted you impression on the best resource to begin learning Python. I willbe using the geany IDE for starting out unless you have a stronger impression else where.

Would love to have your input.

One of the best learning resources for me was Dive Into Python. Dive Into Pythonis a book about Python written for experienced programmers by Mark Pilgrim. The complete text is also available online and as a package (diveintopython). If you install the package you can find the book in /usr/share/doc/diveintopython/html/index.html

Picking the right editor is mostly a matter of personal taste. Some people prefer emacs, vim or vi and feel very strong about it. Personally I’ve been using nano and gedit until I discovered Geany this week. If you have been using windows I would personally recommend you to start with Geany.

Of course, the only true way to learn python is to first learn to write using x86 assembler. Then you can move up to C. Once you’ve written a few non-trivial programs in C you can experiment briefly with Perl (but only briefly, or you get addicted and will forever stay on the dark path). Only then are you truly prepared to understand the brilliance of Python. he he.😉

This is a bit more advanced, but have a look at http://norvig.com/ for some short examples of how you can make python do impressive things. Peter Norvig is Google’s director of research, and his site has several programs that are perfect examples of how to write idiomatic Python.