import win32api<br>import win32ui<br>window = win32ui.FindWindow(None, "123.txt")<br>yourwindow.ShowWindow()<br><br>Traceback (most recent call last):<br> File "C:/python codes/gain_focus.py", line 3, in <module>
<br> window = win32ui.FindWindow(None, "123.txt")<br>win32ui: No window can be found.<br>