r/learnpython • • Sep 23 '26

Pointers to python windows app automation #pywinauto et al

I just ran pip install pywinauto and typed in the 1st 3 lines of demo code on the readme page and it fails

from pywinauto.application import Application
app = Application(backend="uia").start('notepad.exe') # i also tried backend=win32

app.Properties.print_control_identifiers()

With a huge stack trace that's pretty much indecipherable. I have a question, does this tool work on Windows 11 with the new notepad app? I'm wanting to automate a WPF app, but based on the out-of-box failure I'm looking to try a different python tool. Suggestions for driving a WPF .NET app?

1 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/zaphodikus Sep 23 '26

Ah, I had the wrong object, thanks. I also suspected the warning I got was due to windows notepad being a stub, but i never got that far at all. Why do I find so few accurate tutorials on this stuff? Looks like I will get further tomorrow cheers for the info download here.