spyce
home
license
community
download
examples
resources
wishlist
contrib (@sf)
documentation
intro
lang
runtime
modules
tags
install
exits
sourceforge
statistics
freshmeat

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


© 2002-05 Rimon Barr
email: rimon@acm.org
Spyce Powered SourceForge Logo [[ Spyce ]]
Python Server Pages
version 1.3.13