Update for support of Python 2.6

Thought I'd give Git a go - first thing I have ever done with it - so I may have done some things incorrectly!

This is a patch to do minimal support for Python 2.6

I don't think the code impact is too much.