>>> import albatross >>> class Ctx(albatross.SimpleContext): ... def input_add(self, *args): ... print args ... >>> ctx = Ctx('.') >>> ctx.locals.menu = ['spam', 'eggs'] >>> ctx.locals.eric = 'half' >>> ctx.locals.parrot = 'on' >>> ctx.locals.halibut = 'off' >>> albatross.Template(ctx, '', ''' ... ... ... ... ... ... ... ''').to_html(ctx) ('checkbox', 'menu', 'spam', False) ('checkbox', 'menu', 'eggs', False) ('checkbox', 'menu', 'bacon', False) ('checkbox', 'eric', 'half', False) ('checkbox', 'parrot', 'on', False) ('checkbox', 'halibut', 'on', False) >>> ctx.flush_content()