## Script (Python) "getFormattedStudentEntry" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=brain ##title= ## # $Id: getFormattedStudentEntry.py 1269 2007-01-11 17:06:34Z joachim $ """ return a formatted StudentCatalog Entry """ #from Products.zdb import set_trace;set_trace() fields = context.students_catalog.schema() d = {} for f in fields: d[f] = getattr(brain,f,'--') if f == "sex": d[f] = 'M' if d[f]: d[f] = 'F' return d