I want to use python to process some large datasets. To visualize the datasets I want to use processing.js and jquery. The problem is I am a total noob to jquery. Is there a way to run jquery without having to use a server or being connected to the internet? I'd like to use jquery and processing.js to create a standalone interface using a web browser. I'd like to interact with my python scripts from the web browser gui, too. Will someone please explain how this is done to someone new to javascript? Thanks!
1 Answer
jquery is a Javascript library and Javascript runs in the browser on the client side. So the only thing you have to do to use such library is to make sure that your pages include links to that library. See the example here:
5 Comments
wherestheforce
Will you please explain how I can call python scripts using javascript?
Ashalynd
Python scripts are usually running on the backend. There are many ways to send requests to the backend. Most of the time you request the new page or send the contents of a form and get some reaction from your backend. Details depend on which web framework you are going to use. For Python, you might want to look at django: djangoproject.com
wherestheforce
Thanks again Ashalynd. I like the more minalist direction of web.py. Would you be kind enough to provide a short code snippet of how to send a request to a script using web.py? What would be common reaction from the backend?
Ashalynd
Have you seen the tutorial: webpy.org/docs/0.3/tutorial and the cookbook examples:webpy.org/src, the very first one is the simplest: webpy.org/skeleton/0.3 ? Sending most typical HTTP requests from jquery: api.jquery.com/jQuery.get , api.jquery.com/jQuery.post and api.jquery.com/jQuery.ajax (the last one differs from the first two by what is done with the result)