Today was the final day of PyCon. The day started with a keynote by Greg Stein on “Python at Google.” Before the keynote started we were sternly warned that Greg had been requested (by Google legal, I and others around me assumed) not to publish his slides, so we should take notes. With that preface, I was anticipating a “sneak peak” into Google’s secret sauce of Python. Too bad that wasn’t the case. OK, so it was interesting to know that Google considers Python to be one of it’s top three “approved” languages (along with C++ and Java), and that Greg’s intuition is that Google has more Python code than Java in use, but really, how interested can I be in the fact they use SWIG. It’s interesting once, but really, move on, folks. Overall, interesting, but it could have been done in about a third of the time.
After the keynote, I went to Fred Drake’s “Acceptance of XML in the Python Community” followed by Abe Fettig’s “Yarn: Working with Messages in Diverse Formats and Protocols.” Fred’s talk, delayed by technical difficulties can be summarized as follows:
- Python has several ways to handle XML
- Most of them are un-Pythonic
- As developers, its our fault that the documentation isn’t better. Or, as he put it, “I know you don’t like to write documentation. Get over it!”
- There should be “one way to do it.”
OK, so his points are not completely without merit. But frankly, if it pisses you off, present a working alternative, not a parental lecture. But that was just my take.
Abe’s talk, on the other hand, was really cool. Yarn provides a standard interface for messages of all types. Abe demonstrated the “Yarn Browser,” which was able to easily use Yarn to retrieve message lists from IMAP, mbox, RSS and Atom feeds. He also demonstrated using Yarn to retrieve an RSS feed, modify it in place (and see the XML change as you modified class properties), and emit it as Atom. Darn cool.
The final talk of the morning was Evan Jones’ presentation on improving the Python memory allocator. I didn’t realize that Python currently doesn’t free memory when objects are garbaged collected. The memory is freed up for future allocations made from that Python process, but isn’t released back to the operating system until the task terminates. Ouch. Evan wrote a patch which implements a freeing algorithm that attempts to be a little friendlier to resource constrained platforms. Tim Peters said it will probably go in for Python 2.5 (which Guido, incidentally estimated for early 2006 in his keynote yesterday).
After lunch I hung out in the network block, which could probably be more accurately be called the Twisted block. The first talk of the afternoon, “Fast Networking with Python” was actually Yet Another Optimization Discussion (YAOD), during which Itamar Shtull-Trauring talked about things which you can optimize to improve your network application performance. All good suggestions, but I don’t do enough I/O bound networking to make it that worthwhile. Of particular interest was his discussion on the most memory efficient way to copy and concatenate strings, especially in light of Evan’s earlier talk on the memory allocator.
By far the most interesting talk of the afternoon was Thomas Vander Stichele’s demonstration of Flumotion, a Python app that binds to GStreamer and provides a distributed architecture. In his demonstration, he showed how you can perform the video capture on one machine, the encoding on another, and the actual streaming on yet another. And it really, really works. Oh, and did I mention that it contains support for CC licensing, displaying the CC logo superimposed on the stream? Very cool.
Tonite I’m having supper with Shawn (whom I met at Abe’s session this morning) and his wife, because they are truly kind people who didn’t want me to just hang out in my hotel room tonite.