Use try-catch instead of with for py2.4
Don't use new methods for py2.4
Merge pull request #6 from unnonouno/py2.4

Py2.4