Friday, April 27, 2007

PySIG Notes, 26 April 2007

Thirteen attendees made it to the April meeting of the Python Special Interest Group, held as usual at the Amoskeag Business Incubator, Commercial Street, Manchester, NH on the fourth Thursday of the month at 7 PM.

Bill Sconce lead off the meeting with a printed agenda and a round of introductions. Several new people were welcomed to the group; a range of levels of experience with computers and specifically Python made for a good mixed crowd.

Martin LeDoux showed off homemade bookbinding of the Python tutorial. Using an HP laser and Adobe Acrobat, Martin printed duplex 2-up folded, cut, glued and bound a pretty handy homemade book. Very cool.

Shawn K. O'Shea showed off the tarfile module which allows creation, querying, extraction and manipulation of tar files (with gz or bz2 compression) from within Python. This can be a real handy way to create cross-platform installable packages that would run on OS X, Linux or Windows.

Shawn also mentioned that there was a Google API for the Google Calendar with examples in Python scripting. Someone asked what that might be used for, and I offered the LUG coordinator Nag-O-Matic as a great example of using automation with calendars.

Bill attempted an introduction to Python datatypes by creating a hierarchy from primitive to complex objects. Kent had an objection to the terminology, and countered with chapter 3 of the _library_ reference (not chapter 3 of the Python reference which Bill was using) and a vigorous discussion ensued. That's the point of the meeting, after all. And it's far less likely to erupt into a flamewar in person. All sides had some good points, examples and counterexamples, and most of us learned more about Python internals. Good stuff.

Kent started Kent's Korner 4: Iterators and Generators at 9 PM, when the milk and cookies were starting to kick in, The crowd was a bit more subdued, having spent their energy harassing Bill (and heckling Ben, in abstentia). Iterators went quite quickly. Generators woke the crowd up. Bill Sconce came up with a great example of greenbar color code generator, where the boss decides there should be two reds, three greens, alternating and repeating, though he may change his mind once he sees it. Off-script, Kent took off with this example, and followed it with a discussion of parameter passing to a generator.

Kent really has a gift for shedding light on these sometimes obuse topics; his examples really helped make the functionality clear, and working through the real-world example proposed at the meeting gave us all some idea of what was involved.

Kent also mentioned that he's using IPython (note the capitalization; guess it's not an Apple product!) an improved interactive shell.

Meeting called at 9:44. Wow. Long meeting, but a very productive one. One of the attendees wrote to me this morning that he went home and altered some of his scripts based on what he learned at the meeting. No greater praise could we ask for.

Thanks to Bill Sconce for running the meeting, the Amoskeag Business Incubator for the facilities, Alex Hewitt for wrestling with the network, to Martin, Shawn and Kent for presenting, and to all for attending and participating.

Next meeting May 24th, topic TBA.

Postscript: Like the previous meetings, we saw examples running in Python on OS X, Windows (VMWare on the Mac, I think) and Linux. It Just Works.

No comments: