Use the excellent six library for python 2/3 compatibility