March 04, 2004

Learning Python

I've had Python on my list of things to learn for quite some time. Having finally taken the plunge, I have to say that I find myself generally impressed.

Python and Ruby had both been on the list for quite a while but I finally knocked about with Ruby at Christmas. Over the last few weeks I had downloaded a bunch of samples including some of the more recent stuff using the Twisted framework but I hadn't actually written anything. Last Thursday, I had a need to write a tool and finally decided to give Python a whirl.

While not terribly complicated, the tool reads in long file full of comma separated data treating each line as a record, fills in an arbitrary XML template from the CSV data and calls a SOAP based Doc/Lit XML API to perform an operation (with a read afterward for verification). I went from being functionally lost to having a working tool in five hours (quite a bit less than I was expecting). Color me quite impressed.

Among all the documents linked from python.org, I found Instant Python the most useful followed quickly by the built-in functions from the library reference.

I'm definitely going to keep using Python and I might even eventually become accustomed to some of the more offbeat language features (indentation and loops have both caught me in the last week). Lots to learn here but thus it's more enjoyable and approachable than I found Ruby to be (I think my lack of experience with Perl hurts there).

Posted by Dave at March 4, 2004 11:18 PM
Comments