def load_colormap(self, name=None):
if name == None: name = self.get_name()<EOL>if name == "<STR_LIT>" or not type(name)==str: return "<STR_LIT>"<EOL>path = _os.path.join(_settings.path_home, "<STR_LIT>", name+"<STR_LIT>")<EOL>if not _os.path.exists(path):<EOL><INDENT>print("<STR_LIT>"+name+"<STR_LIT>")<EOL>self.save_colormap(name)<EOL>return<EOL><DEDENT>f = open(path, '<STR_LIT:r>')<EOL>x = f.read()<EOL>f.close()<EOL>try:<EOL><INDENT>self._colorpoint_list = eval(x)<EOL><DEDENT>except:<EOL><INDENT>print("<STR_LIT>")<EOL>self.save_colormap()<EOL><DEDENT>self.update_image()<EOL>return self<EOL>
Loads a colormap of the supplied name. None means used the internal
name. (See self.get_name())