py2.4 compatibility