def iter_style_files(style_dir):
 for path in os.listdir(style_dir):
  filename = os.path.basename(path)
  if is_style_file(filename):
   match = STYLE_FILE_PATTERN.match(filename)
   path = os.path.abspath(os.path.join(style_dir, path))
   (yield (path, match.groups()[0]))

def iter_style_files ( style_dir ) : for path in os . listdir ( style_dir ) : filename = os . path . basename ( path ) if is_style_file ( filename ) : match = STYLE_FILE_PATTERN . match ( filename ) path = os . path . abspath ( os . path . join ( style_dir , path ) ) ( yield ( path , match . groups ( ) [ 0 ] ) )
yield file path and name of styles in the given directory .