Source code for: 'tutor2.py'


#!/usr/bin/python

print("""Content-type: text/html

<TITLE>CGI 101</TITLE>
<body text="#000000" leftmargin=0 topmargin=0 bgcolor="#C2C2C6">
<table width=850 border=0 cellspacing=0 cellpadding=0>
  <tr>
  <td align=center>

<H1>A Third CGI Script</H1>
<HR>
<P>Hello, CGI World!</P>

<table border=1>
""")

for i in range(5):
    print('<tr>')
    for j in range(4):
        print('<td>%d.%d</td>' % (i, j))
    print('</tr>')

print("""
</table>
<HR>
<hr><a href="/cgi-bin/getfile.py?filename=tutor2.py">View script code</a>
</td></tr></table>
""")