>>> import albatross >>> ctx = albatross.SimpleContext('.') >>> ctx.locals.seq = range(9) >>> t = albatross.Template(ctx, '', ''' ... pagesize has_prevpage has_nextpage index start count value ... ---------------------------------------------------------- ... ... ... ... ... ... ... ... ... ''') >>> t.to_html(ctx) >>> ctx.locals.i.set_backdoor('nextpage', 'nextpage,i') >>> t.to_html(ctx) >>> ctx.locals.i.set_backdoor('nextpage', 'nextpage,i') >>> t.to_html(ctx) >>> ctx.flush_content() pagesize has_prevpage has_nextpage index start count value ---------------------------------------------------------- 3 False True 0 0 0 0 3 False True 1 0 1 1 3 False True 2 0 2 2 pagesize has_prevpage has_nextpage index start count value ---------------------------------------------------------- 3 True True 3 3 0 3 3 True True 4 3 1 4 3 True True 5 3 2 5 pagesize has_prevpage has_nextpage index start count value ---------------------------------------------------------- 3 True False 6 6 0 6 3 True False 7 6 1 7 3 True False 8 6 2 8