home     documentation     download     Spyce logo


<spy:parent title="Hello, world!" />

[[-- Spyce can embed chunks of Python code, like this. --]]
  import time
  t = time.ctime()

  pull the count from the GET variable.
  the int cast is necessary since request stores everything as a string 
[[ for i in range(int(request.get1('count', 2))):{ ]]
<div>Hello, world!</div>
[[ } ]]

The time is now [[= t ]].
Run this code

Back to List of Examples

Spyce logo
Python Server Pages
version 2.1.3
Spyce Powered SourceForge Logo