Get Your Weekly Dose of Python
Welcome to issue 67 of Python Weekly. I hope everybody is having a nice holiday break and recharging the batteries for the new year.  


Python Software Foundation's board voted to present Antoine Pitrou with a Community Service Award for the fourth quarter of 2012. Antoine has been a prolific CPython contributor throughout his more than five years of work, with his efforts reaching many areas of the code.

Articles, Tutorials and Talks

Python 2.x has unfortunate interface constraints: __str__ and __repr__ methods must return byte strings, but it is not clear what encoding should these byte strings use. This post shows how to deal with these methods (taking __unicode__, default encodings, Python 2.x and Python 3.x in account).

List comprehensions are awesome. They're an incredibly intuitive and readable way to create, filter, join and otherwise modify lists. In the interest of helping young pyrates understand how they can use this simple and elegant tool to their advantage this tutorial will start with the very basics of what list comprehension are, and then gradually scale up to some of their cooler and more esoteric applications. 
Sweave is a tool for embedding R code in a LaTeX file. Pweave is an analogous tool for Python. By putting your code in your document rather than the results of running your code somewhere else, results are automatically recomputed when inputs change. This is especially useful with graphs: rather than including an image into your document, you include the code to create the image.
Lettuce is a test system driven by scenarios used in behavior driven development (BDD). The scenarios are described expressively in English and can be read and understood even for non programmers. Test system like lettuce parsers the scenarios and executes required tests for each step. Lettuce can be used with Django, other web frameworks or scripts.
Support Vector Machine has become an extremely popular algorithm. This post tries to give a simple explanation for how it works and gives a few examples using the the Python Scikits libraries. 

Interesting Projects, Tools and Libraries

Giotto is a python web framework. It encourages a functional style where model, view and controller code is strongly decoupled.
The PiCloud Notebook is a Python console in your browser optimized for data analysis and collaboration. Unlike a traditional console, a notebook lets you intermingle code and descriptive text.
Sevabot is a generic purpose hack-it-together Skype bot. It is based on Skype4Py framework
TerminalMdB  is a *NIX command-line interface for the IMdB. It makes use of the excellent API over at to retrieve basic movie information.
It's a kind of a dictionary of PHP functions and their Python equivalents. The goal is to make it easier for PHP programmers to switch to Python.
Pholcidae is a tiny Python module allows you to write your own crawl spider fast and easy.

New Releases

161 tickets are closed by this release, with the following highlights:
  • Support for local parallel testing in trial
  • A new "react" function to easily run a single asynchronous function in a script with the reactor.
  • Partial support for Python 3.3.

Get Your Weekly Dose of Python