From 07c3aeca6b38ae0d83aa7e7c6ea197f50d10ed7c Mon Sep 17 00:00:00 2001 From: Sam Moore Date: Thu, 16 May 2013 13:28:52 +0800 Subject: [PATCH] Trying to make a cgi script... --- web/web_qchess/qchess.py | 1 + web/web_qchess/web_qchess.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 120000 web/web_qchess/qchess.py create mode 100644 web/web_qchess/web_qchess.py diff --git a/web/web_qchess/qchess.py b/web/web_qchess/qchess.py new file mode 120000 index 0000000..35c6d6e --- /dev/null +++ b/web/web_qchess/qchess.py @@ -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 index 0000000..c0513c1 --- /dev/null +++ b/web/web_qchess/web_qchess.py @@ -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 "\n\nWebbified QChess\n\n" + print "

x = %d\ty = %d <\p>" % (x, y) + print "\n" \ No newline at end of file -- 2.20.1