title: How to input data from a web page to Python script most efficiently
body: <p>How can I most easily input data from a web page and pass it to a Python script?</p>
  
  <p>I've been reading here and on other forums a lot about Python in connection with php or cgi, or even Tornado, Django, etc but I am quite puzzled what is the best solution for me.</p>
  
  <p>I have a Python script that grabs data from the web, generates .html pages etc - when being run there is just one</p>
  
  <pre><code>userIn=str(raw_input())
  </code></pre>
  
  <p>which makes the script gather data based on the input in the terminal. I now only want this input to be coming from some sort of</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  &lt;form action="test.php" method="get"&gt;
  Name &lt;input type="text" name="name" /&gt;
  &lt;input type="submit" /&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>
  
  <p>In the file test.php I have tried passing the value in any kind (proc_open, exec...) but I do not seem to get the connection between python and this form, on top of that I am not sure what's the best idea to pass python's output (some debugging-errors etc) back to the web-interface?!</p>
  
  <p>Thanks a lot!</p>