[Tutor] 2.5 to 2.4 problem with Int

John washakie at gmail.com
Thu Sep 13 08:45:42 CEST 2007

I've written a program which calculates areas of grid cells distributed over
the globe. It works fine with Python 2.5, however, when I run it with
2.4(the Enthon edition) I get the following error:

OverflowError: long int too large to convert to int

It occurs on this line:

 for ix in range(nx): area[ix,iy]=gridarea

I have no idea which int it's referring to? The values of ix/nx will not
exceed 360, iy will not exceed 180. Any suggestions on what to change for
the backward compatability?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070912/e25811a7/attachment.htm 

More information about the Tutor mailing list