title: Send parameters to python script with ajax call
body: <p>I have a WAMP server with Python and I'm trying to setup an AJAX call but I can't understand (after trying many googled results) how to send parameters: script responds but without argument.</p>
  <pre><code>```
  function test(){
      $.ajax({
      url: &quot;sample.py&quot;,
      type: 'POST',
      data: {'param': 123},
      dataType: 'JSON',
      success: function(response){
          $('#message').html(response);
          }
      });
  }```
  </code></pre>
  <pre><code>import sys
  
  if len(sys.argv) &gt; 1:
    output = sys.argv[1]
  else:
    output = &quot;no argument found&quot;
  
  print(&quot;Content-Type: text/html\n&quot;)
  print(output)
  </code></pre>