Python for the total n00b?
April 6, 2007 1:06 AM   Subscribe

What books, programs, sites are there out there to teach Python who has never programmed before? Ideally, I'm looking for a resource that teaches me both the language and general programming concepts.

I like to think I'm pretty technically savvy, but for whatever reason I've never taken up programming to any large extent. I've hacked together some simple "Hello World!" and math apps in python, but that's the extent of my experience.

(Super bonus points if you suggest something interactive similar to Try Ruby)
posted by dantekgeek to Education (15 answers total) 30 users marked this as a favorite
 
Response by poster: "... to teach Python to someone" even
posted by dantekgeek at 1:08 AM on April 6, 2007


Best answer: As someone who's done a fair bit of programming, I got a lot out of Dive Into Python; something to save for when you're a bit more experienced. In the meantime, there's also Learning to Program, a beginner's guide to programming that happens to use Python as its language of choice.
posted by chrominance at 1:10 AM on April 6, 2007 [1 favorite]


Best answer: http://www.ibiblio.org/obp/thinkCSpy/

I enjoyed this when I was in high school. Didn't get anywhere near all the way through it, but what I did get through was cogent, readable, and seemingly just what you're looking for.
posted by crinklebat at 1:12 AM on April 6, 2007


Response by poster: Also, just to pre-empt the inevitable:
Yes, I really do want to learn Python. Not Perl, not Ruby, Python. I much prefer the syntax to that Perl-ish stuff.
posted by dantekgeek at 1:13 AM on April 6, 2007


Gah, sorry, should have hyperlinked that. I think that's a sign I need to go to bed...
posted by crinklebat at 1:14 AM on April 6, 2007


Oh, and though it doesn't have the tutorials that Try Ruby does, Python is also an interpreted language and you can get pretty much the same interactive shell by simply running python at the command line (open up the Command Prompt in Windows). In fact, it's probably a good idea to have the shell open while you're reading Learning to Program so you can follow along.
posted by chrominance at 1:16 AM on April 6, 2007


Response by poster: The fact that Python is interpreted (and has an interpreter built in to OS X) is one of the reasons I chose it. I was more referring to the tutorial or "try doing this (waits for you to do it), now do this" aspect of the Try Ruby site.
posted by dantekgeek at 1:22 AM on April 6, 2007


Best answer: You might consider the Software Carpentry course targetted at scientists who want to learn Python. Not only does it teach Python, but it also teaches some important auxiliary tools and methods such as using a shell, version control, makefiles, SQL, XML, and software engineering.
posted by grouse at 3:42 AM on April 6, 2007 [3 favorites]


Best answer: This entry is a good little guide to learning Python. You didn't mention what OS you're using, but if it's Mac OS X then get the program mentioned in that entry.

It's puts up a split screen with a WebKit-based browser on top and a Python interpreter on the bottom. The browser defaults to Guido's Python tutorial but you can change it to go to any Web-based resource you want. It's a wonderful idea.
posted by bbrown at 6:48 AM on April 6, 2007 [1 favorite]


I'll second Dive into Python...its a very engaging read. From there you should keep your Python interpreter up and running and just experiment.
posted by mmascolino at 6:54 AM on April 6, 2007


though I haven't gotten past the first few chapters - Python Programming for the absolute beginner, Michael Dawsom -- is very approchable for someone with very limited experience (e.g., html). note: O'Reilly bookshelf has it.
posted by ejaned8 at 7:59 AM on April 6, 2007


Ditto crinklebot's How to Think Like a Computer Scientist recommendation. I've never felt the love for Dive Into Python or understood the glowing praise it gets, but mine seems to be a minority opinion. And, of course, don't neglect the Python tutorial. I haven't looked at the Wrox Beginning Python but I'll mention it anyway 'cause one of its authors is a friend of mine and a very smart person and programmer.
posted by Zed_Lopez at 9:53 AM on April 6, 2007


I haven't liked any of O'Reilly's Python offerings other than the cookbooks. This does strike me as odd given the general excellence of their offerings for other programming languages. Anyway, the two books I used to teach myself Python were The Quick Python Book and Python Essential Reference. In fact, I own all three editions of this book.
posted by needled at 2:25 PM on April 6, 2007


The one problem I've had with Dive Into Python is that it's hard to find some of the basics you'd expect to be covered by a Python intro, like what the syntax is for if/for control structures. if statements are covered under 2.5, "Indenting Code," and for loops are covered under 3.6, "Mapping Lists" (if you consider comprehensions the same as for loops) and 6.3, "Iterating with for loops," which is non-intuitively shoved into the Exceptions and File Handling chapter (omgwtfbbq?). But in terms of getting up to speed with the data types and certain modules (hello, regex), it's been great.
posted by chrominance at 3:20 AM on April 7, 2007


Another problem with Dive Into Python is that it is somewhat old and doesn't really teach the best practices for using Python. For example, code is not formatted with the Python style guidelines, he teaches deprecated features, doesn't teach newer features, etc. On the other hand, I notice that even Guido's tutorial is subject to the same complaints.
posted by grouse at 4:20 AM on April 7, 2007


« Older Help me think of an interesting group activity...   |   how can I buy a cellphone for a non relative and... Newer »
This thread is closed to new comments.