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 »
The ctypes module makes loading and calling into a dynamic library incredibly easy.
Read the rest of this entry »
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 »
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 »
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 »
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 »
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 »
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 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 »
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 »
From The Peanut Gallery