view test/test01.py @ 3:f181a1ba4f9f

Added tag R0_4 for changeset c6db338d2d64
author Thinker K.F. Li <thinker@branda.to>
date Wed, 13 Feb 2008 22:37:14 +0800
parents 3679d2d8443a
children
line wrap: on
line source

from __future__ import with_statement
from test_temp01 import test_temp01
from sys import stdout

temp = test_temp01(stdout)
with temp:
    temp.NAME = 'foo'
    temp.item = 'product'
    for i in range(5):
	with temp.LOOP:
	    temp.cost = '$' + str(i)
	    temp.number = str(i)
	    pass
	pass
    pass
temp.commit()