1

I am a beginner in programming and I made a sorting visualizer project in python. As of now I run this program in IDE. I want to put this project on my personal website which I am learning how to build (Javascript for frontend). I do not want to spend time writing the sorting visualizer python program again in JavaScript as I have just started learning JavaScript and it might take much time to write it in JS.

Is there any way in which I can take input from a user on my website in a browser and then pass the input to my python program which performs the tasks and then outputs the result in the browser.

HBK8396
  • 481
  • 1
  • 5
  • 9
  • You'll need a webserver or similar to act as an intermediary between your frontend javascript code and your python backend code. Try looking at Flask. It's a quick and easy python framework https://flask.palletsprojects.com/en/1.1.x/ – chrislondon May 16 '20 at 02:44
  • So basically what I understand is that by using flask I won't have to rewrite the sorting program in JS and can directly take input from a user on my website and using a webserver send that input to my python backend? Btw, thank you very much for the answer PS: for the front-end of the website I want to use Javascript – HBK8396 May 16 '20 at 04:04
  • Does this answer your question? [Bridging a Python back-end and JavaScript front-end](https://stackoverflow.com/questions/45578060/bridging-a-python-back-end-and-javascript-front-end) – Gino Mempin Aug 10 '20 at 01:38

0 Answers0