[Pythonmac-SIG] Keywords <=> Variables in appscript

has hengist.podd at virgin.net
Thu May 6 19:14:20 CEST 2010


Adam Morris wrote:

> How can one refer to keywords  (the k) given a variable?

from appscript import *
s = 'some_keyword'
print getattr(k, s)
# k.some_keyword

HTH

has
-- 
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net



More information about the Pythonmac-SIG mailing list