Compatible to python 2.3
Several update