The December 2008 issue of Python Magazine is available for download now.
Our cover story this month is Using the Cloud, in which Patrick Altman shows you how to wield the power of globally distributed data centers with infinite storage, immediate scalability, and no fixed costs or large capital outlays using Python.
Michael Schneider brings us Design Patterns in Real Python Projects, a survey of design patterns uses found “in the wild”.
What’s new in 1.6.1? Byron Clark contributed a patch to make rmvirtualenv work with zsh, so I packaged up release 1.6.1 of virtualenvwrapper.
What’s the deal with zsh, why is it so popular? What am I missing?
I’m investigating options for hosted version control tools to managed the PyMOTW sources. Currently the files are in a private svn repository, but that makes collaboration difficult. This also gives me an excuse to look at DVCS tools to see how they compare.
Contenders There are 4 contenders, listed here in no particular order:
Google Code (svn) Bitbucket (mercurial) Launchpad (bazaar) GitHub (git) I’m not all that keen on git, mostly because my impression is that it is hard to use.
Matt Wilson posted asking for help cleaning up some date manipulation code he had written. Here’s my attempt:
import simplejson from datetime import date, datetime, timedelta import calendar def get_dict_or_cookie_value(key, d, s): value = d.get(key) if not value and s.has_key(key) and s[key].value: value = simplejson.loads(s[key].value) return value def get_start_and_stop_dates(d, s): """ Returns a tuple of datetime.date objects. First checks dictionary d, then looks in the cookie s, then returns the first and last day of the month.
The first annual PyWorks conference has just wrapped up, and it was by all accounts a big success. We had a great time socializing, learning about new tools, and catching up on the progress made by established projects. The Atlanta weather was unusually wet, but that didn’t stop some of us from heading off site to attend the local Python user group meeting, too. All in all, it was a fun and productive three days.
Blogger doesn’t let me set a different option on an individual post, and since not all of the posts are PyMOTW articles I’ve been trying to keep the “convert line breaks” flag on because it makes it easier for posts like these. The results have been a little ugly, but I think I have that straightened out, finally.
I prepare the PyMOTW articles using reST and convert them to HTML with Sphinx.
The readline module can be used to enhance interactive command line programs to make them easier to use. It is primarily used to provide command line text completion, or “tab completion”.
Read more at pymotw.com: readline