A little closer, this seems to work, but it's not catching the 'W' or 'S' cases to make it negative...
for i in range(0,20): y=d[i][2].split('\xb0') x=d[i][3].split('\xb0') ydeg,ymin=int(y[0].rstrip()),float(y[1].strip('\' N')) xdeg,xmin=int(x[0].rstrip()),float(x[1].rstrip("\' E").rstrip("\' W")) if re.search('\Z W','x[1]'): xdeg=-1*xdeg if re.search('\Z S','y[1]'): ydeg=-1*ydeg declat=abs(ydeg)+ymin/60 declon=abs(xdeg)+xmin/60 if ydeg < 0: declat=declat*-1 if xdeg < 0: declon=declon*-1 elv=int(d[i][4].strip('m'))
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor