'this function doesn\'t segfault but causes the
PyEval_RestoreThread: NULL state bug on win32'

def show(self):

    _focus = windowing.FocusManager()
    if (not self._shown):
        def destroy(*args):
            self.window = None
            Gcf.destroy(self._num)
        self.canvas._tkcanvas.bind(u'<Destroy>', destroy)
        self.window.deiconify()
        self.window.update()
    else:
        self.canvas.draw_idle()
    self.canvas.manager.window.attributes(u'-topmost', 1)
    self.canvas.manager.window.attributes(u'-topmost', 0)
    self._shown = True
