The Daily Build

Icon

Software Development, version 3.0

3 Easy Ways to Stick to a Coding Standard

When you’re writing python, you don’t need a lot of debate over the minutiae of most coding standards. PEP 8 does that for you. Even better, there are some tools that make it really easy to stick to the standard.
Why do this? Well, for one thing it makes code reviews easier when everyone follows the [...]

Read the rest of this entry »

Using Python’s ctypes to Call Into C Libraries

The ctypes module makes loading and calling into a dynamic library incredibly easy.

Read the rest of this entry »

Yet Another Python Enum Module

I didn’t like the existing enum recipes, so I cooked up what I feel is a better way of working with enumerations in python. The result is yapyenum, hosted on github. Rather than come up with something new to say about it, I’ll just repost the README here:
This module provides named enumerations for python.
Unlike other [...]

Read the rest of this entry »

Python Exception Handling: Cleanup and Reraise

I’ve had this code around for a while and had an opportunity to drag it out the other day and dust it off. The problem: Every now and again there’s a situation where you don’t really want to catch an exception, but you do want to perform some cleanup and let the exception propagate up [...]

Read the rest of this entry »

Five Days to a Django Web App: Day Three, Coding

Thanks for coming back for Day Three!
[Note: Sorry this post is a day late. It was all ready to go late yesterday, but some of the code included below triggered a bug either in WordPress or ScribeFire and the whole post got mangled. I managed to resurrect it today from drafts, and I think it's [...]

Read the rest of this entry »

Jesse Noller on Python

Jesse Noller has been republishing articles he wrote for Python Magazine. These are very informative: I learned new things about the “with” statement in python 2.5 and tonight I was introduced to Paramiko, a library for using SSH.

Read the rest of this entry »