def __load(self, dir, verbose=False):
    """
      @summary: builds self.files, which is a dictionary of file-handle-like
                objects indexed by name.
      @param dir: -if single string we treat as directory of files to load
                  -if a list of string, we treat as list of filenames to load
                  -if list of anything else, treat as list of file-handle-like
                   objects (must have .name attributes)
    """
    if type(dir).__name__ == "str":
      for f in os.listdir(dir):
        name = os.path.splitext(f)[0]
        self.files[name] = open(os.path.join(dir, f))
    else:
      for f in dir:
        if type(f).__name__ == "str":
          f = open(f)
        name = os.path.splitext(f.name)[0]
        self.files[name] = f
def __load ( self , dir , verbose = False ) : if type ( dir ) . __name__ == "str" : for f in os . listdir ( dir ) : name = os . path . splitext ( f ) [ 0 ] self . files [ name ] = open ( os . path . join ( dir , f ) ) else : for f in dir : if type ( f ) . __name__ == "str" : f = open ( f ) name = os . path . splitext ( f . name ) [ 0 ] self . files [ name ] = f
@summary: builds self.files, which is a dictionary of file-handle-like
                objects indexed by name.
      @param dir: -if single string we treat as directory of files to load
                  -if a list of string, we treat as list of filenames to load
                  -if list of anything else, treat as list of file-handle-like
                   objects (must have .name attributes)