|
 |
 |
 |
Examples
|
[[ Spyce ]]
Python Server Pages by Rimon Barr |
examples/hello2.spy
|
<html><body>
Hello [[print 'world!',]]
[[ for i in range(10): { ]]
[[=i]]
[[ } ]]
<br>
Color chart:<br>
<table border=0 cellpadding=0 cellspacing=0>
[[ cols = ['22', '66', 'AA', 'EE' ]
lencols3 = 5*len(cols)
for r in cols: { ]]
<tr>
[[ for g in cols: { ]]
[[ for b in cols: { ]]
<td width=5 height=[[=lencols3]] bgcolor="#[[=r+g+b]]"></td>
[[ } ]]
[[ } ]]
</tr>
[[ } ]]
</table>
</body></html>
|
Run this code.
(requires Spyce-enabled web server)
|
Back to List of Examples
|