Closes every opened files and removes their associated **Script_Editor_tabWidget** Widget tabs.

        :return: Method success.
        :rtype: bool
342265
def close_all_files(self, leave_first_editor=True):
        

        # self.__engine.start_processing("Closing All Files ...", len(self.list_editors()))
        success = True
        for file in self.list_files():
            success *= True if self.close_file(file, leave_first_editor) else False
            if not success:
                break

                # self.__engine.step_processing()
        # self.__engine.stop_processing()
        return success
203960
def close(self):
        
        files = self.__dict__.get("files")
        for _key, value in iter_multi_items(files or ()):
            value.close()
1348132
def close_panel(self):
        
        self.hide()
        self.lineEditReplace.clear()
        self.lineEditSearch.clear()
1312207
def close(self):
        '''  '''
        for plugin in self.plugins:
            if hasattr(plugin, 'close'): plugin.close()
        self.stopped = True
384934
def _Close(self):
    """"""
    # pylint: disable=protected-access
    super(EWFFile, self)._Close()

    for file_object in self._file_objects:
      file_object.close()

    self._file_objects = []
1119813
def remove_tab(self, index):
        
        widget = self.widget(index)
        try:
            document = widget.document()
        except AttributeError:
            document = None  # not a QPlainTextEdit
        clones = self._close_widget(widget)
        self.tab_closed.emit(widget)
        self.removeTab(index)
        self._restore_original(clones)
        widget._original_tab_widget._tabs.remove(widget)
        if self.count() == 0:
            self.last_tab_closed.emit()
        if SplittableTabWidget.tab_under_menu == widget:
            SplittableTabWidget.tab_under_menu = None
        if not clones:
            widget.setParent(None)
        else:
            try:
                clones[0].syntax_highlighter.setDocument(document)
            except AttributeError:
                pass
558397
def close_file(self):
        

        if not self.is_modified():
            LOGGER.debug("> Closing '{0}' file.".format(self.__file))

            self.file_closed.emit()
            return True

        choice = message_box.message_box("Warning", "Warning",
                                         "'{0}' document has been modified!\nWould you like to save your changes?".format(
                                             self.get_file_short_name()),
                                         buttons=QMessageBox.Save | QMessageBox.Discard | QMessageBox.Cancel)
        if choice == QMessageBox.Save:
            if self.save_file():
                LOGGER.debug("> Closing '{0}' file.".format(self.__file))
                return True
        elif choice == QMessageBox.Discard:
            LOGGER.debug("> Discarding '{0}' file.".format(self.__file))

            self.file_closed.emit()
            return True
        else:
            return False
794334
def close(self, clear=True):
        
        if self._tooltips_runner:
            self._tooltips_runner.cancel_requests()
            self._tooltips_runner = None
        self.decorations.clear()
        self.modes.clear()
        self.panels.clear()
        self.backend.stop()
        Cache().set_cursor_position(
            self.file.path, self.textCursor().position())
        super(CodeEdit, self).close()
163127
def _close_widget(widget):
        
        if widget is None:
            return
        try:
            widget.document().setParent(None)
            widget.syntax_highlighter.setParent(None)
        except AttributeError:
            pass  # not a QPlainTextEdit subclass
        # handled cloned widgets
        clones = []
        if hasattr(widget, 'original') and widget.original:
            # cloned widget needs to be removed from the original
            widget.original.clones.remove(widget)
            try:
                widget.setDocument(None)
            except AttributeError:
                # not a QTextEdit/QPlainTextEdit
                pass
        elif hasattr(widget, 'clones'):
            clones = widget.clones
        try:
            # only clear current editor if it does not have any other clones
            widget.close(clear=len(clones) == 0)
        except (AttributeError, TypeError):
            # not a CodeEdit
            widget.close()
        return clones
1360464
def close(self):
        
        from .collection import Collection
        from .data._data import Channel, Data, Variable

        path = os.path.abspath(self.filepath) + "::"
        for key in list(Group._instances.keys()):
            if key.startswith(path):
                Group._instances.pop(key, None)

        if self.fid.valid > 0:
            # for some reason, the following file operations sometimes fail
            # this stops execution of the method, meaning that the tempfile is never removed
            # the following try case ensures that the tempfile code is always executed
            # ---Blaise 2018-01-08
            try:
                self.file.flush()
                try:
                    # Obtaining the file descriptor must be done prior to closing
                    fd = self.fid.get_vfd_handle()
                except (NotImplementedError, ValueError):
                    # only available with certain h5py drivers
                    # not needed if not available
                    pass

                self.file.close()
                try:
                    if fd:
                        os.close(fd)
                except OSError:
                    # File already closed, e.g.
                    pass
            except SystemError as e:
                warnings.warn("SystemError: {0}".format(e))
            finally:
                if hasattr(self, "_tmpfile"):
                    os.close(self._tmpfile[0])
                    os.remove(self._tmpfile[1])
1012024
def close(self):
        """"""
        for tif in self._files.values():
            tif.filehandle.close()
        self._files = {}
1323576
def _close(self):
        '''
        
        '''
        if hasattr(self, 'aiohttp'):
            if not self.aiohttp.closed:
                self.aiohttp.close()
        if hasattr(self, 'file_descriptors'):
            for fd in self.file_descriptors.values():
                if not fd.closed:
                    fd.close()
205314
def close_all():
    """"""
    for key, p in _ALL_PLOTTERS.items():
        p.close()
    _ALL_PLOTTERS.clear()
    return True
605992
def close(self):
        
        if hasattr(self, '_FITS'):
            if self._FITS is not None:
                self._FITS.close()
                self._FITS = None
        self._filename = None
        self.mode = None
        self.charmode = None
        self.intmode = None
        self.hdu_list = None
        self.hdu_map = None
1066587
def _close_list(self):
        
        list_type = self.current_parent_element['attrs']['class']
        tag = LIST_TYPES[list_type]

        html = '</{t}>'.format(
            t=tag
        )
        self.cleaned_html += html
        self.current_parent_element['tag'] = ''
        self.current_parent_element['attrs'] = {}
731528
def close(self):
    
    if not self._is_open:
      raise IOError('Not opened.')

    if not self._is_cached:
      close_file_object = True
    elif self._resolver_context.ReleaseFileObject(self):
      self._is_cached = False
      close_file_object = True
    else:
      close_file_object = False

    if close_file_object:
      self._Close()
      self._is_open = False
632315
def close_buffer(self):
        
        eb = self.active_editor_buffer

        # Remove this buffer.
        index = self.editor_buffers.index(eb)
        self.editor_buffers.remove(eb)

        # Close the active window.
        self.active_tab.close_active_window()

        # Close all the windows that still have this buffer open.
        for i, t in enumerate(self.tab_pages[:]):
            t.close_editor_buffer(eb)

            # Remove tab when there are no windows left.
            if t.window_count() == 0:
                self.tab_pages.remove(t)

                if i >= self.active_tab_index:
                    self.active_tab_index = max(0, self.active_tab_index - 1)

        # When there are no windows/tabs left, create a new tab.
        if len(self.tab_pages) == 0:
            self.active_tab_index = None

            if len(self.editor_buffers) > 0:
                # Open the previous buffer.
                new_index = (len(self.editor_buffers) + index - 1) % len(self.editor_buffers)
                eb = self.editor_buffers[new_index]

                # Create a window for this buffer.
                self.tab_pages.append(TabPage(Window(eb)))
                self.active_tab_index = 0
            else:
                # Create a new buffer. (This will also create the window
                # automatically.)
                eb = self._get_or_create_editor_buffer()