| Revision 631,
384 bytes
checked in by jdalbey, 5 years ago
(diff) |
|
appendRatingToLog.py evalratings.csv New files added for #251.
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/usr/bin/python |
|---|
| 2 | # Append a single evaluation rating to a log file |
|---|
| 3 | # Import modules for CGI handling |
|---|
| 4 | import cgi, cgitb, os |
|---|
| 5 | |
|---|
| 6 | # Create instance of FieldStorage |
|---|
| 7 | form = cgi.FieldStorage() |
|---|
| 8 | |
|---|
| 9 | # Get data from fields |
|---|
| 10 | outMessage = form.getvalue('msg') |
|---|
| 11 | |
|---|
| 12 | # write message to file (append) |
|---|
| 13 | text_file = open("dynamicdata/evalratings.csv", "a") |
|---|
| 14 | text_file.write(outMessage) |
|---|
| 15 | text_file.close() |
|---|
| 16 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.