title: Callback in python script
body: <p>I've never used python before. Thus, I'm kind of confused. I'm trying to use python script to obtain data from the education api. I'm unsure as to how I would accomplish this. I have the following python script: </p>
  
  <pre><code>#!/usr/bin/python
  
  # Import modules for CGI handling 
  import cgi, cgitb
  import urllib2 
  
  # Create instance of FieldStorage 
  form = cgi.FieldStorage() 
  
  #download data from request parameter 'url' 
  print "Content-type:text/xml\r\n\r\n"  
  url = form.getvalue("url") 
  callback = form.getvalue("callback")
  req = urllib2.Request(url) 
  response = urllib2.urlopen(req) 
  data = response.read() 
  print callback + "(" + data+ ")"
  </code></pre>
  
  <p>I know I would replace the url in this text with url of the website I'm requesting the data from. However, what do I replace callback with? </p>
  
  <p>I also understand I will need make a ajax call to retrieve the json data in my browser. How would I do this? </p>
  
  <p>The code I have to return the json is the following: </p>
  
  <pre><code>$.ajax({
  url : "getData.py",
  data : {url : "http://api.education.com/service/service.php?f=schoolSearch&amp;key=mykey&amp;
  sn=sf&amp;v=4&amp;city=Atlanta&amp;state=ga&amp;Resf=json"},
  complete : function(xhr, result) {
  if (result != "success")
  return;
  var response = xhr;
  console.log(var);
  </code></pre>