def appendRemoveToFile(self, filename):
        arr = self.uicheckboxes.getRemoveAsArray()
        if len(arr) == 0:
            return

        if not Path(filename).is_file():
            print("File does not exist, will create it: {}".format(filename))
            colaboratory_helpers.dumpArrToFile(filename, arr)
        else:
            colaboratory_helpers.appendArrToFile(filename, arr)
 def appendMoversToTheirFiles(self):
     """
     Append the arrays to the filenames (but NOT including remove), not multi label
     """
     for lbl, filename in self.uicheckboxes.uiMoveLables.items():
         arr = self.uicheckboxes.getMoverAsArray(lbl)
         print("Checking {} {} ".format(lbl, filename))
         if len(arr) == 0:
             continue
         if not Path(filename).is_file():
             print("File does not exist, will create it: {}".format(filename))
             colaboratory_helpers.dumpArrToFile(filename, arr)
         else:
             colaboratory_helpers.appendArrToFile(filename, arr)
    def appendRemoversToTheirFilesMultiLabel(self):
        """
        Append the arrays to generated filenames for the selected labels which should have a label REMOVED
        """
        for lbl in self.uicheckboxes.uiMoveLables:
            arr = self.uicheckboxes.getRemoveLabelAsArray(lbl)

            #create filename
            filename = self.multi_label_moversdir + lbl + ".remove.csv"

            print("Checking {} {} ".format(lbl, filename))
            if len(arr) == 0:
                continue
            if not Path(filename).is_file():
                print("File does not exist, will create it: {}".format(filename))
                colaboratory_helpers.dumpArrToFile(filename, arr)
            else:
                colaboratory_helpers.appendArrToFile(filename, arr)
 def appendAllProcessed(self, arr, filename):
     if not Path(filename).is_file():
         print("File does not exist, will create it: {}".format(filename))
         colaboratory_helpers.dumpArrToFile(filename, arr)
     else:
         colaboratory_helpers.appendArrToFile(filename, arr)