Re: [Pythonmac-SIG] Help getting properties in py-appscript?

2010-04-13 Thread Aahz
On Tue, Apr 13, 2010, Charles Turner wrote: > > This works just fine at the top level of the script, but when I get() > and reference props inside a function definition, Python complains about > the dot in k-dot-name, for example: > > "UnboundLocalError: "local variable 'k' referenced before ass

Re: [Pythonmac-SIG] Help getting properties in py-appscript?

2010-04-13 Thread Charles Turner
OK- Adding this at the script top-level enabled me to continue: r_uuid = k.uuid r_name = k.name r_type = k.type r_tags = k.tags r_plain_text = k.plain_text so my references to props[r_uuid] work inside a function definition. I'd still very much appreciate any elucidation of my problem, as I'm

[Pythonmac-SIG] Help getting properties in py-appscript?

2010-04-13 Thread Charles Turner
Hi all- Having some trouble getting my head around this, and wonder if someone could shed some light. I'm using py-appscript to get the properties of a record in DEVONthink Pro: from appscript import * dtpo = app('DEVONthink Pro.app') i = dtpo.selection.get() props = i[0].properties.get(