def show(self, **options): # update instance options for k, v in options.items(): self.options[k] = v self._fixoptions() master = self.master if master is None: master = _get_temp_root() try: self._test_callback(master) # The function below is replaced for some tests. s = master.tk.call(self.command, *master._options(self.options)) s = self._fixresult(master, s) finally: _destroy_temp_root(master) return s
def destroy(self): '''Destroy the window''' self.initial_focus = None Toplevel.destroy(self) _destroy_temp_root(self.master)