summaryrefslogtreecommitdiffstats
path: root/Demo/cgi/cgi2.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-07-17 20:59:35 (GMT)
committerCollin Winter <collinw@gmail.com>2007-07-17 20:59:35 (GMT)
commit6f2df4d5e193d54244b0c2de91ef0ab1604b9243 (patch)
tree5e172400da7561eb4bb8fafc62c8cab511d74dad /Demo/cgi/cgi2.py
parenta8c360ee76fb76902a2e2140fbb38d4b06b2d9fb (diff)
downloadcpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.zip
cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.tar.gz
cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.tar.bz2
Run 2to3 over the Demo/ directory to shut up parse errors from 2to3 about lingering print statements.
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()