format with indicies for py 2.6 and early versions of py 3