fixed coordinate generation for python 2.x