Trying to make a cgi script...
[progcomp2013.git] / web / web_qchess / web_qchess.py
diff --git a/web/web_qchess/web_qchess.py b/web/web_qchess/web_qchess.py
new file mode 100644 (file)
index 0000000..c0513c1
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/python
+
+import sys
+import os
+import cgi
+
+
+if __name__ == "__main__":
+       form = cgi.FieldStorage()
+       x = int(form.getvalue("x"))
+       y = int(form.getvalue("y"))
+       
+       print "Content-type:text/html\r\n\r\n"
+       print "<html>\n<head>\n<title>Webbified QChess</title>\n</head>\n<body>"
+       print "<p> x = %d\ty = %d <\p>" % (x, y)
+       print "</body>\n</html>"
\ No newline at end of file

UCC git Repository :: git.ucc.asn.au