7 Jan
2002
7 Jan
'02
2:09 a.m.
I have the following script (python)... ## Script (Python) "tester" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters= ##title= ## dict = {} string = 'dict' print getattr(script, string) return printed I was hoping that I would receive a printout of whatever dict contains, but instead I get an AttributeError:dict. Obviously, the problem lies in getattr(script,...). So, my question is, which object should I pass into getattr to get hold of the 'string' (and subsequently 'dict') variable? Can I do this? cheers tim