def prompt(self, matches):
        """Prompt user to remove cells from subtitle file."""

        if Config.options.autoyes:
            return matches

        deletions = []

        for match in matches:
            os.system('clear')
            print(self.cells[match])
            print('----------------------------------------')
            print("Delete cell %s of '%s'?" % (str(match + 1), self.filename))
            response = getch().lower()
            if response == 'y':
                os.system('clear')
                deletions.append(match)
            elif response == 'n':
                os.system('clear')
            else:
                if deletions or self.modified:
                    LOGGER.warning("Not saving changes made to '%s'",
                                   self.filename)
                sys.exit(0)

        return deletions
def prompt ( self , matches ) : if Config . options . autoyes : return matches deletions = [ ] for match in matches : os . system ( 'clear' ) print ( self . cells [ match ] ) print ( '----------------------------------------' ) print ( "Delete cell %s of '%s'?" % ( str ( match + 1 ) , self . filename ) ) response = getch ( ) . lower ( ) if response == 'y' : os . system ( 'clear' ) deletions . append ( match ) elif response == 'n' : os . system ( 'clear' ) else : if deletions or self . modified : LOGGER . warning ( "Not saving changes made to '%s'" , self . filename ) sys . exit ( 0 ) return deletions
Prompt user to remove cells from subtitle file.