Python HTML data transfer | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Python HTML data transfer

Is there any method to : A - Store a .py file on HTML / JavaScript and when a button is clicked, run the file, or B - somehow run Python code when something in JavaScript is triggered If you know how to do any of these it would be greatly appreciated.

17th Sep 2018, 12:33 AM
Carson
Carson - avatar
1 Answer
0
Browsers can not run python only javascript, you can try to combine react with django to simulate the outcome. Javascript will send data to the server, server will run python code and send back a response with the outcome, React will update the virtual dom without reloading the whole page
17th Sep 2018, 5:00 PM
JME