Support both python2 and python3