home *** CD-ROM | disk | FTP | other *** search
- [[\
- install_location = '/usr/share/spyce'
- release='1'
- egprefix = request.get1('egprefix')
- if not egprefix:
- egprefix='examples/'
- ]]
-
- [[ def includeCode(filename, egprefix=egprefix, run=1): {
- import os
- ]]
- [[.compact mode=off]]
- <table border=1 align=center>
- <tr><td align=left bgcolor="#cccccc">
- <font face="arial, helvetica" size="-1"><b>[[=filename]]</b></font>
- </td></tr><tr><td>
- <font face=courier>
- <pre>[[=include.spycecode(filename)]]</pre>
- </font>
- [[if run==1: {]]
- </td></tr><tr><td align=right bgcolor="#cccccc">
- <font face="arial, helvetica" size="-1">
- <b><a href="[[=egprefix+os.path.split(filename)[1] ]]">Run this code</a>.</b>
- <small><small><br>(requires Spyce-enabled web server)</small></small>
- </font>
- [[ } ]]
- </td></tr></table>
- [[.compact]]
- [[ } ]]
-