support for python2.6

Let me know if this isn't the right way, i'd be happy to change.