def close_tab(self, index):

        # do not delete the last tab
        if self.tab_widget.count() == 1:
            return

        if not os.environ.get('GLUE_TESTING'):
            buttons = QMessageBox.Ok | QMessageBox.Cancel
            dialog = QMessageBox.warning(self, "Confirm Close",
                                         "Are you sure you want to close this tab? "
                                         "This will close all data viewers in the tab.",
                                         buttons=buttons,
                                         defaultButton=QMessageBox.Cancel)
            if not dialog == QMessageBox.Ok:
                return

        w = self.tab_widget.widget(index)

        for window in w.subWindowList():
            widget = window.widget()
            if isinstance(widget, DataViewer):
                widget.close(warn=False)

        w.close()

        self.tab_widget.removeTab(index)
Overrides the default whitespace chars
dataset/ETHPy150Open glue-viz/glue/glue/app/qt/application.py/GlueApplication.close_tab--crossover with--dataset/ETHPy150Open pypa/pip/pip/_vendor/pyparsing.py/ParserElement.setDefaultWhitespaceChars