Trying to make a cgi script...
authorSam Moore <[email protected]>
Thu, 16 May 2013 05:28:52 +0000 (13:28 +0800)
committerSam Moore <[email protected]>
Thu, 16 May 2013 05:28:52 +0000 (13:28 +0800)
web/web_qchess/qchess.py [new symlink]
web/web_qchess/web_qchess.py [new file with mode: 0644]

diff --git a/web/web_qchess/qchess.py b/web/web_qchess/qchess.py
new file mode 120000 (symlink)
index 0000000..35c6d6e
--- /dev/null
@@ -0,0 +1 @@
+../../qchess/qchess.py
\ No newline at end of file
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