(self)
Load the list from the specified file.
Load the list from the specified file.
Load the list from the specified file .
def load(self):
        """
        Load the list from the specified file.
        """
        self.clear()

        # simple touch to create non existent files
        try:
            open(self.filename, 'a').close()
        except Exception:
            pass

        try:
            with open(self.filename, 'r') as fh:
                for l in fh.readlines():
                    self.add(re.split("#", l)[0].rstrip("[ , \n,\t]"))
        except Exception:
            pass
def load ( self ) : self . clear ( ) # simple touch to create non existent files try : open ( self . filename , 'a' ) . close ( ) except Exception : pass try : with open ( self . filename , 'r' ) as fh : for l in fh . readlines ( ) : self . add ( re . split ( "#" , l ) [ 0 ] . rstrip ( "[ , \n,\t]" ) ) except Exception : pass