First attempt to support python2