Aahz wrote:

> 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 assignment""
> 
> You need to provide the code.  

+1. It sounds like the OP's function is assigning values to 'k' at some point, 
e.g. 'for k, v in d.items():...', which is a general Python error, as you say. 
In which case, either pick a different variable name or use 'import appscript' 
and 'appscript.k.KEYWORD_NAME'.

HTH

has

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

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

Reply via email to