title: Trouble retrieving JSON from python script via $.getJSON in javascript
body: <p>Right now, I'm trying to access data from the education.com API. However, I'm still unable to do so.</p>
  
  <p>Basically, from what I understand, I'm supposed to use this python script to suppress the cross domain restriction for browsers. The python script is called getData.py, and I'm using the following code. Verbatim: </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>Then, I need to call the python script in my JavaScript/jQuery code through the $.getJSON. My professor said I need to pass the url of education API, and the call back to this script. I'm unsure as to how I would do this. How would I do this? What is my callback? This is my jquery code. I removed my key from the url for privacy. It is replaced by the word <strong>mykey</strong>. </p>
  
  <pre><code>$.getJSON("getData.py", { 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;Re
  sf=json"}, function(data) {  
  console.log(data);
  });
  });
  </code></pre>