def atexit_operations(self):
    'This will be executed at the time of exit.\n\n        Cleanup operations and saving of persistent data that is done\n        unconditionally by IPython should be performed here.\n\n        For things that may depend on startup flags or platform specifics (such\n        as having readline or not), register a separate atexit function in the\n        code that has the appropriate information, rather than trying to\n        clutter\n        '
    self._atexit_once()
    for tfile in self.tempfiles:
        try:
            tfile.unlink()
            self.tempfiles.remove(tfile)
        except FileNotFoundError:
            pass
    del self.tempfiles
    for tdir in self.tempdirs:
        try:
            tdir.rmdir()
            self.tempdirs.remove(tdir)
        except FileNotFoundError:
            pass
    del self.tempdirs
    if (hasattr(self, 'editing_mode') and (self.editing_mode == 'vi')):
        sys.stdout.write('\x1b[0 q')
        sys.stdout.flush()
This will be executed at the time of exit.

Cleanup operations and saving of persistent data that is done
unconditionally by IPython should be performed here.

For things that may depend on startup flags or platform specifics (such
as having readline or not), register a separate atexit function in the
code that has the appropriate information, rather than trying to
clutter
def atexit_operations(self):
    'This will be executed at the time of exit.\n\n        Cleanup operations and saving of persistent data that is done\n        unconditionally by IPython should be performed here.\n\n        For things that may depend on startup flags or platform specifics (such\n        as having readline or not), register a separate atexit function in the\n        code that has the appropriate information, rather than trying to\n        clutter\n        '
    self._atexit_once()
    for tfile in self.tempfiles:
        try:
            tfile.unlink()
            self.tempfiles.remove(tfile)
        except FileNotFoundError:
            pass
    del self.tempfiles
    for tdir in self.tempdirs:
        try:
            tdir.rmdir()
            self.tempdirs.remove(tdir)
        except FileNotFoundError:
            pass
    del self.tempdirs
    if (hasattr(self, 'editing_mode') and (self.editing_mode == 'vi')):
        sys.stdout.write('\x1b[0 q')
        sys.stdout.flush()