Sunday, April 18, 2010

A small library wants to break out of pywinauto

I have been working on pywinauto for about 4 and a half years now and its not really moving in any direction. I make small tweaks here and there and make releases from time to time - but nothing major.

This was the first open source project that I released and I think maybe I was a little over-enthusiastic :). I had hoped that I would be using it myself, I also wished it to be functional and easy enough thatthat it could replace expensive commercial software with similar functionality (but with their own annoying languages). But I am no longer working with said software and my main focus went to other things.

I believe now that pywinauto should be split. There is at least 1 small library (and probobaly more) that should be freed from the overall project.
  • Get information from windows controls (Maybe of the questions on the pywinauto list is how to get the values from text boxes, etc.)
  • A library for automating Windows, not an auotmation framework/language - a library. Meaning that it is up to the user to delay between clicks for windows to open/close. It is up to the user how they want to select controls.
  • SendKeysCtypes (I re-wrote Python SendKeys so that it would support Unicode and not need to be compiled (uses Ctypes). This is more or less ready to release - I just haven't gotten around to doing that :(. (if you need it - grab it from Pywinauto SVN)
  • pywinauto - which would use these previous components but would be much smaller itself, it would work as it does now, trying to help the user as much as possible in not having to worry about timing issues.
Seeing as it turned out that *I* don't really need an automation library/toolkit - it would be great to get some help with some of this work.

Other directions I am thinking of are providing modules so that pywinauto (or the gui automation libarary) can work as an almost direct replacement of things like AutoHotkey or AutoIT or use a similar API as LDTP.

I also need to fix the Pywinauto web presence - which is amazingly scattered - but this post is already long enough.


  1. I would encourage you to throw it up on GitHub or BitBucket. Both have thriving Python sub-communities, and the use of DVCS encourages others to fork and enhance the library as they see fit. Once you have it up there, add a README file that talks about what the library currently does, and where you would like to see it go.

  2. I just tried pywinauto over the weekend under Win7 and couldn't get it to run at all. I thought the project had died, but if you're still actively working on it, I'll post a bug report tonight.

  3. Oddly enough, I became interested in programming while trying to find a way to do some simple windows automation tasks. My googling led me to autoit, which introduced me to programming, and made me want to learn a real language, so I shifted to python before learning to do anything much in autoit. Anyway, months later, I ran into this library. It took about 2 minutes to install it and get it running and it does most of what I wanted to learn to do with autoit. The learning curve seems almost nonexistent. I could read through the modules even with my still quite limited knowledge. It's a tragedy that this incredible work on your part hasn't been adopted/supported by more people; perhaps part of the broader tragedy of Python, which could have been a language that made it possible for anyone, regardless of background, to program and instead has become deeply embedded in what feels at times like 'class warfare' between the open source community and the weirdly personified 'Windows menace,' which in reality is just lots of ordinary people. Not sure if I hit an anecdote of yours or the other person who worked on this-- the one about presenting it to a python club, which of course has been waiting for windows automation with bated breath (oh and what flavor of linux is this 'windows' again?). Anyway, if reading between the lines, it seems you've become less interested in this project, I can't blame you. But I am sorry to hear it. It may take awhile, but I'll be surprised if the scattered windows python users of the world don't grow in number and adopt your excellent work. I am on Win7 x64 btw, (in re: alex dante), so I guess if there's been a Win7 issue it must have been long fixed.

  4. To add my voice to the choir: I'm actively using pywinauto in a number of research projects at work and it's great!

    We work a lot with 3rd party models, often provided as point-and-click GUI software programs. They usually don't come with command-line configuration options or any other form of automation, so Python+pywinauto is a superb combination to incorporate these models into our own modelling workflow.

    So, yeah: I would definitely want to encourage you to not let the pywinauto project die... The Github/Bitbucket suggestion from swheatly is excellent: even if you further develop it yourself, input from other Python developers could prove to be valuable.

    Anyway, at least you should know that your work is much appreciated over here.