summaryrefslogtreecommitdiffstats
path: root/Demo/cgi/cgi2.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-12-30 17:22:33 (GMT)
committerGeorg Brandl <georg@python.org>2010-12-30 17:22:33 (GMT)
commit4cf83f4d128bd40ebe3b6e59ced4895f554d18de (patch)
treeccc6e4c3e03a711c45f4badf811314231d646d95 /Demo/cgi/cgi2.py
parentd1fc34d563a9fd06a78226b1bb4e56286c70e035 (diff)
downloadcpython-4cf83f4d128bd40ebe3b6e59ced4895f554d18de.zip
cpython-4cf83f4d128bd40ebe3b6e59ced4895f554d18de.tar.gz
cpython-4cf83f4d128bd40ebe3b6e59ced4895f554d18de.tar.bz2
Remove some of the old demos. (Put a few somewhere else.)
Diffstat (limited to 'Demo/cgi/cgi2.py')
-rwxr-xr-xDemo/cgi/cgi2.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/Demo/cgi/cgi2.py b/Demo/cgi/cgi2.py
deleted file mode 100755
index 8aa57b3..0000000
--- a/Demo/cgi/cgi2.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env python3
-
-"""CGI test 2 - basic use of cgi module."""
-
-import cgitb; cgitb.enable()
-
-import cgi
-
-def main():
- form = cgi.FieldStorage()
- print("Content-type: text/html")
- print()
- if not form:
- print("<h1>No Form Keys</h1>")
- else:
- print("<h1>Form Keys</h1>")
- for key in form.keys():
- value = form[key].value
- print("<p>", cgi.escape(key), ":", cgi.escape(value))
-
-if __name__ == "__main__":
- main()