parameters: (filename)
return_statement: return latitude
docstring: Find the <PointLatitude> value in the given file.
docstring_summary: Find the <PointLatitude> value in the given file.
docstring_tokens: Find the <PointLatitude > value in the given file .
function: def parseLatitude(filename):
      '''Find the <PointLatitude> value in the given file.'''
  
      if not os.path.exists(filename):
          raise Exception("Could not find file: " + filename)
  
      latitude = None
      with open(filename, "r") as xf:
          for line in xf:
              m = re.match("^.*?\<PointLatitude\>(.*?)\<", line, re.IGNORECASE)
              if m:
                  latitude = float(m.group(1))
                  break
  
      if latitude is None:
          raise Exception("Could not parse positive or negative latitude from: " + filename)
  
      return latitude
function_tokens: def parseLatitude ( filename ) : if not os . path . exists ( filename ) : raise Exception ( "Could not find file: " + filename ) latitude = None with open ( filename , "r" ) as xf : for line in xf : m = re . match ( "^.*?\<PointLatitude\>(.*?)\<" , line , re . IGNORECASE ) if m : latitude = float ( m . group ( 1 ) ) break if latitude is None : raise Exception ( "Could not parse positive or negative latitude from: " + filename ) return latitude