| Revision 547,
467 bytes
checked in by jdalbey, 6 years ago
(diff) |
|
Add SampleEvalPage?.html and cgi-bin/saveEvals. Demo programs for saving EInotebook evaluations.
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/usr/bin/python |
|---|
| 2 | # Import modules for CGI handling |
|---|
| 3 | import cgi, cgitb |
|---|
| 4 | # Create instance of FieldStorage |
|---|
| 5 | form = cgi.FieldStorage() |
|---|
| 6 | # Get data from fields |
|---|
| 7 | output = "" |
|---|
| 8 | for j in range(1, 3): |
|---|
| 9 | output += form.getvalue('group'+str(j)) |
|---|
| 10 | output += ", " |
|---|
| 11 | |
|---|
| 12 | print "Content-type:text/html\r\n\r\n" |
|---|
| 13 | print "<html>" |
|---|
| 14 | print "<head>" |
|---|
| 15 | print "<title>Response CGI Program</title>" |
|---|
| 16 | print "</head>" |
|---|
| 17 | print "<body>" |
|---|
| 18 | print "<h2>We read %s</h2>" % (output) |
|---|
| 19 | print "</body>" |
|---|
| 20 | print "</html>" |
|---|
Note: See
TracBrowser
for help on using the repository browser.