[Pythonmac-SIG] py-appscript 32-bit terminology.dump() attempts failing in Lion

steve harley garbanzito at mac.com
Tue May 8 01:22:59 CEST 2012


i am sending commands to FileMaker Pro 12 Advanced via py-appscript on OS X 10.7.4; i'm getting the same behavior noted in a thread from July 2010 — specifically, AppleScript can use terms from the app's dictionary normally, but py-appscript gets a truncated dictionary that is apparently the Cocoa default, and has none of the terms needed for constructive work with FileMaker

in that thread, this was Has' workaround, which apparently worked for the OP using FileMaker 11 (no OS version noted):

> As a workaround, use the dump function in appscript.terminology to export the FMP dictionary to a static module and pass that module when creating app objects, like this: app('FileMaker Pro', terms=fmp11terminologymodule). Make sure you run the dump command under 32-bit Python (use 'arch -i386' followed by the path to the python interpreter in the Python.framework bundle) as it uses OSAGetAppTerminology, which isn't present in OS X's 64-bit APIs. 
> 


<http://mail.python.org/pipermail/pythonmac-sig/2010-July/022453.html>

i'm on OS X 10.7.3 using stock python, so i've tried these incantations to run 32-bit python for the task:

 arch -i386 /usr/bin/python2.7
 arch -i386 /System/Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7

in both cases i issue the dump command like this

>>> import appscript, appscript.terminology
>>> appscript.terminology.dump(u'/Applications/FileMaker Pro 12 Advanced/FileMaker Pro Advanced', u'/Users/me/Documents//fmp12a_glueb.py')

but the result is still the truncated (useless) dictionary; ASDictionary 0.13.1 also produces the same result

is there something i'm missing, or is this workaround not possible in Lion?

alternatively, if anyone has created such a terminology dump for FileMaker Pro 12 (Advanced or not, or even version 11), i would be happy to receive a copy

thanks




More information about the Pythonmac-SIG mailing list