Hi all, I have a problem using DocumentTemplate.String. I try to use the python extended string syntax use it to generate C++ code . I want DocumentTemplate to call a method for me and put the result in the output file. But unfortunatly the doc is not that clear for that particular use. I'm not sure that anyone here uses DocumentTemplate in that way ... Could you check my example code , where french people will recognize typical french idioms, and tell me where is the misuse ? The resulting error message is : Document Template Parse Error: Document Template Parse Error: Invalid attribute name, ""_['toto'].myprint()"", for tag %(call "_['toto'].myprint()")s, on line 2 of <string><p> Note that the first call doen't make an error, but is not interpreted as a command. Thanks Stephane my code ====================== import DocumentTemplate l__att_type= "ATTTYPE" l__att_name= "ATTTRIBUTE" l__att_member_name = "ATTRIBUTEMEMBER" results = """\ %(call "coucou()")s %(call "_['toto'].myprint()")s """ class TOTO: def __init__(self): self.coucou = "coucou" print self.coucou def myprint(self): print self.coucou toto = TOTO() def coucoucoucou(): print coucoucou dic = {'is_date_att':1,'att_type':l__att_type,'att_name':l__att_name,'att_member':l__att_member_name, 'toto' : toto} print dic print dic['toto'].myprint() print DocumentTemplate.String(results)(None, dic)