def ExpandPathAttribute(src, attrib):
 path = src.get(attrib)
 if (not path):
  return [src]
 path = encoder.MaybeNarrowPath(path)
 pathlist = glob.glob(path)
 if (not pathlist):
  return [src]
 if (type(src) != types.DictionaryType):
  tmp = {}
  for key in src.keys():
   tmp[key] = src[key]
  src = tmp
 retval = []
 for path in pathlist:
  dst = src.copy()
  dst[attrib] = path
  retval.append(dst)
 return retval

def ExpandPathAttribute ( src , attrib ) : path = src . get ( attrib ) if ( not path ) : return [ src ] path = encoder . MaybeNarrowPath ( path ) pathlist = glob . glob ( path ) if ( not pathlist ) : return [ src ] if ( type ( src ) != types . DictionaryType ) : tmp = { } for key in src . keys ( ) : tmp [ key ] = src [ key ] src = tmp retval = [ ] for path in pathlist : dst = src . copy ( ) dst [ attrib ] = path retval . append ( dst ) return retval
given a dictionary of attributes .