#NEWLINE# def dmsStrToDeg( dec ) : #NEWLINE# #INDENT# 'Convert a string representation of DEC into a float in degrees.' #NEWLINE# ( sign_deg , min , sec ) = dec . split ( ':' ) #NEWLINE# sign = sign_deg [ 0 : 1 ] #NEWLINE# if ( not ( sign in ( '+' , '-' ) ) ) : #NEWLINE# #INDENT# sign = '+' #NEWLINE# deg = sign_deg #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# deg = sign_deg [ 1 : ] #NEWLINE# #UNINDENT# dec_deg = decTimeToDeg ( sign , int ( deg ) , int ( min ) , float ( sec ) ) #NEWLINE# return dec_deg