开发者

call a server side python script from javascript

how to call a server side python script from javascript. if test.py is the python script file in server, and if the parameter to be passed to python is another url , then how开发者_StackOverflow中文版 this can be executed from javascript, how the return string from python script is obtained to the javascript.


You can directly call the python script from javascript. You need to use an appropriate server-side technology (asp.net, php, servlet). The best solution will be to create a REST service, by defining a URL, which when called (through ajax for example) will execute the python script and write the output to the body of the request. This will be easier if you are using django or another python web framework.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜