Fixed python3 compatibility.
Fixed python3 compatibility.

CleanCut/green,smspillaz/green,wfxiang08/green,CleanCut/green,wfxiang08/green,smspillaz/green,wfxiang08/green,krisztianfekete/green,krisztianfekete/green,smspillaz/green