def remove_label(self, to_remove):
        """
        Remove a label from the document. (-> rewrite the label file)
        """
        if to_remove not in self.labels:
            return
        labels = self.labels
        labels.remove(to_remove)
        with self.fs.open(self.fs.join(self.path, self.LABEL_FILE), 'w') \
                as file_desc:
            for label in labels:
                file_desc.write("%s,%s\n" % (label.name,
                                             label.get_color_str()))
def remove_label ( self , to_remove ) : if to_remove not in self . labels : return labels = self . labels labels . remove ( to_remove ) with self . fs . open ( self . fs . join ( self . path , self . LABEL_FILE ) , 'w' ) as file_desc : for label in labels : file_desc . write ( "%s,%s\n" % ( label . name , label . get_color_str ( ) ) )
Remove a label from the document. (-> rewrite the label file)