def validateSVGfiles(svgFilePathsList):
 validatedPaths = []
 for filePath in svgFilePathsList:
  fileName = os.path.basename(filePath)
  if (fileName[0] == '.'):
   continue
  data = readFile(filePath)
  svg = reSVGelement.search(data)
  if (not svg):
   print ('WARNING: Could not find <svg> element in the file. Skiping %s' % filePath)
   continue
  validatedPaths.append(filePath)
 return validatedPaths

def validateSVGfiles ( svgFilePathsList ) : validatedPaths = [ ] for filePath in svgFilePathsList : fileName = os . path . basename ( filePath ) if ( fileName [ 0 ] == '.' ) : continue data = readFile ( filePath ) svg = reSVGelement . search ( data ) if ( not svg ) : print ( 'WARNING: Could not find <svg> element in the file. Skiping %s' % filePath ) continue validatedPaths . append ( filePath ) return validatedPaths
light validation of svg files .