summaryrefslogtreecommitdiffstats
path: root/Demo/cgi/cgi2.py
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/cgi/cgi2.py')
-rwxr-xr-xDemo/cgi/cgi2.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Demo/cgi/cgi2.py b/Demo/cgi/cgi2.py
index d956f65..239fb6b 100755
--- a/Demo/cgi/cgi2.py
+++ b/Demo/cgi/cgi2.py
@@ -8,15 +8,15 @@ import cgi
def main():
form = cgi.FieldStorage()
- print "Content-type: text/html"
- print
+ print("Content-type: text/html")
+ print()
if not form:
- print "<h1>No Form Keys</h1>"
+ print("<h1>No Form Keys</h1>")
else:
- print "<h1>Form Keys</h1>"
- for key in form.keys():
+ print("<h1>Form Keys</h1>")
+ for key in list(form.keys()):
value = form[key].value
- print "<p>", cgi.escape(key), ":", cgi.escape(value)
+ print("<p>", cgi.escape(key), ":", cgi.escape(value))
if __name__ == "__main__":
main()