def DestroyViewWindow(self): win32gui.DestroyWindow(self.hwnd) self.hwnd = None print("Destroyed scintilla window")