ajax - How to get response of Python Script in Sencha Touch? -
i have written python script named abc.py prints json array. code given below
import urllib2 import json json_object={"key":"value"} print json_object
the output follows:
{'key': 'value'}
now want retrive json in sencha touch application. making ajax call. code written below:
ext.ajax.request({ url: 'resources/startup/abc.py', contenttype: 'application/json', reader: { type: 'json', }, success: function(response) { console.log(response); }, } });
but when running application, not getting json object. instead getting raw code written inside abc.py.
output:
import urllib2 import json json_object={"key":"value"} print json_object
where doing mistake??? appreciated.
this python bug. rename abc.py filename.
Comments
Post a Comment