Add python3 compatibility

Drop python 2.5 compatibility