[Zope] Using getattr to access a variable defined in a Script (Python)
   
    Tim Hicks
     
    timNOT_THIS@sitefusion.co.uk
       
    Mon, 7 Jan 2002 02:09:04 -0000
    
    
  
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