python2.4 compatibility