In article <4a7dcdba.9060...@codebykevin.com>,
 Kevin Walzer <k...@codebykevin.com> wrote:
> What options currently exist for making a Python application on the Mac 
> scriptable via AppleScript, i.e. allowing it to respond to Apple events 
> and making Python data objects and functions accessible from AppleScript?
> 
> I'm aware of AppScript, but as I understand it, this module is designed 
> more to allow Python apps to drive *other* AppleScriptable apps via the 
> OSA. I'm interested in the opposite. I understand that there used to be 
> some modules to support this, but they appear to be deprecated.
> 
> Any advice is apprecaited.

I have no personal experience but I imagine, perhaps naively, that the 
"right way" to do that these days would be to use PyObjC and py2app to 
create a Cocoa application and then build upon Cocoa's built-in support 
for Apple events.  Presumably that would include supplying an sdef and 
modifying the app bundle's Info.plist to enable scripting as outlined 
here:

http://developer.apple.com/documentation/Cocoa/Conceptual/ScriptableCocoa
Applications/SApps_implement/SAppsImplement.html#//apple_ref/doc/uid/2000
0037-BAJBBDFE

-- 
 Ned Deily,
 n...@acm.org

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to