cmweiss / geomag

Automatically exported from code.google.com/p/geomag
45 stars 43 forks source link

python3 compatibility? #6

Open proximous opened 8 years ago

proximous commented 8 years ago

Not sure how much of a problem it is, but line 267 in geomag.py should explicity use integer division ('//') to be python3 compatible.

$ python -3                                               
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import geomag
/usr/local/lib/python2.7/dist-packages/geomag/geomag.py:267: DeprecationWarning: classic int division
  D2=(n-m+D1)/D1

the compatible version would be:

  D2=(n-m+D1)//D1

(double slash to indicate integer division)

todd-dembrey commented 8 years ago

Would be fixed by #3

sposs commented 4 years ago

Hi, I'm facing an error using the 'public' package of the package:

    __singleton__ = GeoMag()
NameError: name 'GeoMag' is not defined

I believe the issue does not occur with the code from @todd-dembrey. Is this repo still active? If yes, can those changes be merged?