fix up the python 3.x compatible issue.
fix up the python 2.6 compatible issue.