Make compatible with python 2.4
Fix warning
Fix version to compare
Merge pull request #34 from chen3feng/develop

Make compatible with python 2.4