Category Archives: Python

In 2008 I started learning Python (with *a lot* of help from David Beazley, thank you good sir!). I can’t get enough. Here I discuss what I’m learning, and eventually, how it applies to the web.

Beautiful Soup Tutorial Featuring Select Boxes

This example deals primarily with pulling option values out of select boxes, and should be much easier to understand than my last, somewhat convoluted Beautiful Soup example. However, much like the previous example, this one stemmed from a “real world” … Continue reading

Posted in Python | 1 Comment

Using Python and os.walk to Locate the Firefox Cache

My series of Beazley-related Python lessons picks up again here. This is actually a small part of a bigger assignment, which was to decode the files within a user’s Firefox cache (coming later), but this nice little script can be … Continue reading

Posted in Python | 1 Comment

Parsing and Calculating Data with Python and CSV Files

I’ve recently wrapped up a Dynamic Languages class, taught by David Beazley. Being a Python guru, this sorta turned into a Python class, but I had no problem with that. With Dave’s permission, I’ll be posting a few of the … Continue reading

Posted in Python | 2 Comments

Textmate & Running Python Scripts in Interactive Mode

So yeah, as I check out Emacs, I also checkout things in Textmate that I might not know about, and I’m learning that Textmate can do *lots* more cool stuff than I thought it could. One of those is (yes!) … Continue reading

Posted in OS X, Python | Leave a comment

Launch IDLE on Default Leopard Installation

Yes, IDLE is installed on Leopard – you just need to launch it from the command line. Continue reading

Posted in Python | 7 Comments

Beautiful Soup – Example 1

I’m finding The Soup to be extremely useful for turning static HTML sites into dynamic, database driven sites. For example, scraping the desired html data, dumping it into a CSV file, and importing it into MySQL. Here’s one “real-world” example of how to do that. Continue reading

Posted in Python | Tagged | 4 Comments