How not to program WSGI
12 May 2008
In this post I explain how, (perhaps to my shame), I hacked PyBlosxom to serve robots.txt. Kids, do not follow at home.
Email Syntax Check in Python
03 May 2008
Sometimes you may want to check that an email address is not syntactically invalid, i.e. it looks like a recognisable email address. In this post I examine a couple of ways of doing that.
Twelve commandments for Beautiful Python code
25 April 2008
In this article, I argue that the benefits of reading Python code in a standardised format outweigh any benefits of bespoke code styles. I then look at 12 rules that will make your code your Python code more readable,
Sharing our scripts together
15 April 2008
In this post I talk about a project on Launchpad called "Eden" for sharing of specialised but useful scripts.
Scripting Twitter with Python
09 April 2008
Twitter is a social networking service where users can write a sentence (maximum 140 characters) about themselves. It also has an API that we can use to receive and send data from Twitter.
Using OpenOffice History at the Command Line
07 April 2008
In this post I write a Python module to print out all the stored OpenOffice document history.
OOXML Vote: The Python Script Walkthrough
27 March 2008
I talk about my Python script that allowed me to produce live updates of the vote in the OOXML standardisation process.
Scripting the National Lottery: Part One
25 March 2008
I had a chat with an older lady about the British National Lottery. She buys six tickets for each draw, one for everyone in her family. So the question is what she is getting in return for the ticket price? Lets write some Python scripts to find out.
Setting up a bazaar server
24 February 2008
So last year I wrote a little tutorial about using bazaar for my own personal projects. Please read that if you have no idea what I am talking about.
This weekend I started working on a project with a small group of friends. Therefore we decided to create a bzr server so we can all track the code that we are writing together.
Baby Steps with Django - Part 4 Django Applications and flow
18 February 2008
In the previous installment of this series, I explained that a Django site is normally organised into a 'project' which contains 'applications'.
We started a new Django 'project' (i.e. a website). This was a directory with a few files in. The most interesting were settings.py, the project's settings, and urls.py which maps URLs to functions.
Baby Steps with Django - Part 3 Django projects
02 February 2008
Projects and Applications
In theory, as long as Python can find everything, you can organise your own web application code however you want; however, we might as well follow the default Django way until we have a good reason not to. A Django website is normally organised into a 'project' which contains 'applications'.
Baby Steps with Django - part 2 database setup
25 January 2008
So I introduced this series seven months ago, oops! Oh well, let's get started.
Three Useful Python Bindings - ClamAV, Apt and Evolution
01 December 2007
Python is not just cool because it easy to code with, it also has loads of bindings to almost every major open source project, (as well as to some famous proprietary software that we don't care about here).
Index your Flickr Photos in Python
17 November 2007
A friend asked me to look at a broken script that he found online. The script used the Python module for interfacing with the Flickr API. So I thought I would go and give the Flickr API a try.
Guest Post: A Response to Directory to Webpage
03 November 2007
*In the last post, I talked about how I turned a directory of PDFs to an HTML list. An example of the filenames was C_L_Warrior.pdf, which I turned into a simple index of files by author. *
Directory of Files to Webpage
02 November 2007
Recently, I was asked to put up several hundred PDFs on the web and make a simple index that links to them all. Adding that many links through the Uni's CMS was not feasible, being several clicks per link and a lot of waiting for the Java applets to do their stuff. However, the CMS allows you to import HTML. So I decided to generate the HTML and then import it in. Fortunately, the files had been given very consistent names by a careful secretary, so I could use those as the basis for the link text.
Pylons part 2 - Getting Pylons
30 September 2007
Install Pylons
In the last part we got easy_install working. Now we can start properly and get Pylons installed. You will need to run the following command as root:
Pylons part 1 - Getting easy_install
30 September 2007
Pylons Versions
Pylons is under active development, currently building up to it's 1.0 release, expected in 2008. Consequently, there were some very big changes between 0.9.5 and 0.9.6; not least for the fact that the templating engine and database abstraction library were completely swapped out. So you want to be learning with version 0.9.6 or above.


