I want my Python program to be AppleScript-able, just like an Objective C program would be. Is that possible?
(Note, this is not about running AppleScript from Python programs, nor about calling Python programs from AppleScript via Unix program invocation. Those are straightforward. I need genuine AppleScriptability of my program's operations.)
There is some documentation about how to do this. Python 2.7.2 documentation describes MiniAEFrame, for example, but even a minimal reference to from MiniAEFrame import AEServer, MiniApplication dies with an ImportError and a complaint that a suitable image can't be found / my architecture (x86) not supported. Rut roh! It seems that MiniAEFrame might pertain to the earlier ("Carbon") API set. In other words, obsolete.
There's a very nice article about "Using PyObjC for Developing Cocoa Applications with Python" (http://developer.apple.com/cocoa/pyobjc.html). Except it was written in 2005; my recently-updated version of Xcode (4.1) doesn't have any of the options it describes; the Xcode project files it provides blow up in an impressive build failure; and the last PyObjC update appears to have been made 2 years ago. Apple seems to have removed all of the functions that let you build "real" apps in AppleScript or Python, leaving only Objective C.
So, what are my options? Is it still possible to build a real, AppleScriptable Mac app using Python? If so, how?
(If it matters, what I need AppleScripted is text insertion. I need Dragon Dicate to be able to add text to my app. I'm currently using Tk as its UI framework, but would be happy to use the native Cocoa/Xcode APIs/tools instead, if that would help.)