All you need is to make an ajax request to your pythoncode.
You can do this with jquery http://api.jquery.com/jQuery.ajax/, or use just javascript
$.ajax({
type: "POST",
url: "~/pythoncode.py",
data: { param: text}
}).done(function( o ) {
// do something
});
More Related Contents:
- How to receive and maintain values in functions (javascript)
- Web-scraping JavaScript page with Python
- JavaScript plus sign in front of function expression
- jQuery 1.9 .live() is not a function
- Calling a function every 60 seconds
- WebDriver click() vs JavaScript click()
- Are “(function ( ) { } ) ( )” and “(function ( ) { } ( ) )” functionally equal in JavaScript? [duplicate]
- How can I pass data from Flask to JavaScript in a template?
- How to create a jQuery function (a new jQuery method or plugin)?
- `new function()` with lower case “f” in JavaScript
- Cannot read property ‘addEventListener’ of null
- Django csrf token + Angularjs
- Fastest JavaScript summation
- Scrolling to top of the page in Python using Selenium
- Method vs Functions, and other questions
- Mechanize and Javascript
- Can you write nested functions in JavaScript?
- Asynchronous Script Loading Callback
- How to disable a “Reload site? Changes you made may not be saved” popup for (python) selenium tests in chrome?
- Can I name a JavaScript function and execute it immediately?
- Class methods as event handlers in JavaScript?
- How can I integrate Python and JavaScript?
- How to download an image with Python 3/Selenium if the URL begins with “blob:”?
- Does JavaScript support array/list comprehensions like Python?
- How can I have a host and container read/write the same files with Docker?
- difference between parseInt() and parseFloat() [duplicate]
- How to use the variables from “views.py” in JavasScript, “” in Django Template?
- Passing a function with arguments as an argument?
- sending data as JSON object from Python to Javascript with Jinja [duplicate]
- javascript click event handler fires without clicking