diff options
author | Collin Winter <collinw@gmail.com> | 2007-07-17 20:59:35 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-07-17 20:59:35 (GMT) |
commit | 6f2df4d5e193d54244b0c2de91ef0ab1604b9243 (patch) | |
tree | 5e172400da7561eb4bb8fafc62c8cab511d74dad /Demo/cgi/cgi2.py | |
parent | a8c360ee76fb76902a2e2140fbb38d4b06b2d9fb (diff) | |
download | cpython-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-x | Demo/cgi/cgi2.py | 12 |
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() |