Python Magazine for November

Somehow the release of our November issue snuck right past me. There’s a good range of articles this month, covering decorators, working with RSS feeds, IDLE, and Gtk. My column is about the use of Python in scientific applications, and Mark’s discusses operator overloading. Brian’s column addresses some of the feedback we’ve seen from readers of the October issue. If you’re a subscriber, you should have already received an email notification that the PDF is available for download.

feedcache 1.3 - purging and redirects

What’s new? Release 1.3 of feedcache is available. This version supports purging the cache by the age of the contents. After some discussion with Thomas Perl about how to handle redirects, I decided to leave the existing behavior alone. That means redirected feeds are returned, but not stored in the cache. It’s up to the caller to recognize that a feed was redirected and update the list of URLs being checked, depending on the actual response code.

PyCon: The PyCon 2007 podcast

The audio recordings from PyCon 2007 are finally being posted! I know it’s hard to record in those big ballrooms at conventions, so I hope the audio quality on these is OK. PyCon: The PyCon 2007 podcast

PyMOTW: inspect

The inspect module provides functions for learning about live objects, including modules, classes, instances, functions, and methods. You can use functions in this module to retrieve the original source code for a function, look at the arguments to a method on the stack, and extract the sort of information useful for producing library documentation for your source code. My own CommandLineApp module uses inspect to determine the valid options to a command line program, as well as any arguments and their names so command line programs are self-documenting and the help text is generated automatically.

requiring packages with distutils

The documentation for distutils alleges that using the requires keyword allows a package to declare a dependency. I can’t for the life of me make this do anything useful. What I expect to happen is when I use easy_install to download a package with another requirement, that required package should also be downloaded. Here’s what I have: from distutils.core import setup import os setup ( name = 'BlogBackup', version = '1.

virtualenv

A couple of days ago, Chris posted about using virtualenv to create sandboxes on Leopard instead of installing packages directly into the Frameworks directory. I’d heard of virtualenv, but never tried it before. After reading what Chris said, I downloaded it and gave it a try, and have to say, “Wow!” I had been worried about installing a ton of dependencies on my system so I could test code associated with articles submitted to Python Magazine.

Algorithm Blogs » Python module usage statistics

Imri Goldberg has put together some interesting statistics about Python module use frequency by analyzing modules downloaded from PyPI. I’m not surprised to see Zope modules showing up so high on the list, given the number of separate Zope-related packages posted there now. He might need a switch to filter out Zope modules from the counts. :-)

OSS projects for new Python developers?

Titus Brown is looking for small projects suitable for new developer to work on. The idea is to come up with something they can do to make a real contribution without feeling overwhelmed by the scope of the project. If you have any suggestions, head over and let him know via comments on his blog.

PyMOTW: urlparse

The urlparse module provides an interface for splitting up Uniform Resource Locator strings into their parts. Read more at pymotw.com: urlparse

love/hate python stdlib modules

Titus wants to know which standard library modules we use frequently, even though we don’t like how they work or find the documentation confusing. re – I can never remember the difference between search() and match() timeit – I haven’t actually used it that often, but find the API a little weird. Why do I pass the text of the code to time, instead of a callable like a function or method?