X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=googlemap%2Fdegree2decimal.py;h=071879b6e6d82039145041ecae65eb9b88239b10;hb=8f28ec5073c521e5976d9bd86a27a45ddf1ca2f3;hp=873cd54e8e124b477549f491d4c71579b5af29e3;hpb=2f4401b535c10ffa6292049e228c1d1655cb8c2d;p=plewww.git diff --git a/googlemap/degree2decimal.py b/googlemap/degree2decimal.py index 873cd54..071879b 100755 --- a/googlemap/degree2decimal.py +++ b/googlemap/degree2decimal.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # transforms a degree notation like # 43:36:56.32 (43 degrees 36 minutes 56.32 seconds) # into a decimal notation @@ -14,14 +14,14 @@ second=1./3600 def translate (coord): r=matcher.match(coord) if not r: - print 'failed to parse',coord,'pattern=',pattern + print('failed to parse',coord,'pattern=',pattern) else: - (deg,min,sec)=map(float,r.groups()) + (deg,min,sec)=list(map(float,r.groups())) # print 'deg',deg,'min',min,'sec',sec if (deg>0): - print coord,'->',deg+min*minute+sec*second + print(coord,'->',deg+min*minute+sec*second) else: - print coord,'->',deg-min*minute-sec*second + print(coord,'->',deg-min*minute-sec*second) def main():