text = win32gui.GetWindowText(edit) print(text)
(though recent versions handle this automatically) win32gui