Ajax POST/GET request TO a python server
<p>I am googleing around and trying, and I find no answer (I do not mean "How do I send POST requests using python?").</p>

<p>Story:</p>

<p>Developing a POS system I am already using python scripts to perform some tasks like communication with hardware peripherals. Until now these scripts are running on a small server with Apache installed and are started via POST request to an <code>ajax.php</code>, let's say with two params <code>$_POST['name']='scriptname'</code> and <code>$_POST['param1']=1200</code> which are transmitted over php command like <code>system('python ' . $_POST['name'] . '.py ' . $_POST['param1'] . ' &amp;');</code> into <code>system('python scriptname.py 1200 &amp;');</code></p>

<p>Now I am thinking about to setup a pure Linux/Python server without Apache installed and want perform the same things.</p>

<p>Let's say, simpleHTTPserver is up and running for the specified folder.</p>

<p>1st question:</p>

<p>How can I manage it, so send POST (or for now let's say GET) requests from another network client to this server like <code>http://192.168.20.11:8080/scriptname.py?arg=1200</code></p>

<p>2nd question: </p>

<p>How can I get a response like 'done' or a number like 1560 as response from the USB scale, to continue to work with the response (the ajax data part) on the sending network client?</p>