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 Four, Deployment

Thanks for your patience, and for coming back for a discussion of deploying our Django web app.
In case you missed any of the previous posts in this series, here they are:

Day One, Get Ready (Concept and prep)
Day Two, Mockups (Creating a design)
Day Three, Coding (Coding tests, views, templates, and models)

Pre-Deployment
First, we need to make a [...]

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 »

Five Days to a Django Web App: Day Two, Mockups

Welcome back.
Ready for Day Two? Did you get your “hello world” app running on your host?
Where We Stand
Yesterday we nailed down our concept, bought a domain name and hosting, set up our toolkit, and deployed a practice app on the host.
Here’s what I’m going to build: a web app to keep track of job applications, [...]

Read the rest of this entry »

Five Days to a Django Web App: Day One, Get Ready

This is the first in a series of posts that will walk through the steps of designing, building, and deploying a complete web app using Django. I’m going to assume you know the basics when it comes to Python, Django, HTML, CSS, Javascript and some basic tools. This will be a part time effort, so [...]

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 »

Deploying Django Apps on Dreamhost

The Dreamhost wiki article on Django helped, but all the steps starting from scratch aren’t really documented in one place. Hopefully the list below will help, but since I’m writing it after the fact and I had to go through a couple of iterations to get it right, there are probably some things that aren’t [...]

Read the rest of this entry »