mardi 7 février 2017

On submission of form, run python on website and display figure

I have some python code that accepts a few parameters, performs some calculations with scipy/numpy, and then plots and displays a figure with matplotlib. I want to run this on a webpage (which I made with bootstrap), and I've set up an html form to input the parameters and run the code. I want the python code to run with the inputted parameters when I click submit, but I have no idea where to put my code/how to wrapper my code/how to get this to work in general.

One suggestion I saw was to use trinket.io, but it doesn't support scipy and that can't be replaced in my program. I also read that I need to use the WebAgg backend for matplotlib, which I've done, but I don't know what to do next. Other answers I've seen talk about different packages and frameworks... I'm very much a beginner at web development, and I have no idea where to even start with those.

What is the easiest way to get this python code to run on my website?




Aucun commentaire:

Enregistrer un commentaire