support python version 2.6+