'Restores most recently pushed output.  There are many
output parameters such as nullvalue, mode
(list/tcl/html/insert etc), column widths, header etc.  If you
temporarily need to change some settings then
:meth:`push_output`, change the settings and then pop the old
ones back.
A simple example is implementing a command like .dump.  Push
the current output, change the mode to insert so we get SQL
inserts printed and then pop to go back to what was there
before.'

def pop_output(self):

    assert len(self._output_stack)
    if (len(self._output_stack) == 1):
        o = self._output_stack[0]
    else:
        o = self._output_stack.pop()
    for (k, v) in o.items():
        setattr(self, k, v)
