Template Processing Classes for Python
By Brad Howes
Dr. Dobb's Journal February 1998
>>> from BoilerPlate import String >>> z = '''#for x in a#%(x.index)d %(x.value)d #end for#Total: %(x.sum)d''' >>> print String( z, a = range( 0, 100, 10 ) ) 0 0 1 10 2 20 3 30 4 40 5 50 6 60 7 70 8 80 9 90 Total: 450
Example 3: for processing.
Copyright © 1998, Dr. Dobb's Journal