I plan on writing a more in-depth article on this when I have time (it’ll happen, really!), but for now, I thought I’d share a little Python OSA script I wrote last month that resizes my Terminal.app terminals and generally cleans up my workspace in my preferred window setup: work.py.
Programming in Python with py-appscript is marginally better than programming in Applescript (since the syntax isn’t quite as braindead), although there are challenge of its own, since you can’t get sizes exactly of collections without making the function call and all that. Also, there were lots of interesting challenges with limitations of Terminal.app’s bindings and other silly things like how to minimize windows. I’ll write more about it later, but in the meantime, hopefully this turns out to be useful for some people.