The World’s Largest Online Community for Developers

'; Python/Pandas: How to add python script to alter a dynamic html file ( creating buttons in html file to run specific functions in the same .py file ) - LavOzs.Com

a quick intro: I have one python project called python-work and within this project, I have only one python file ( Within there are several functions (def). All of these functions return a .html file (displaying a table).. this all works perfectly.

The .html file being displayed is always different than any other .html file I have created via the functions. In other words, I don't only have one .html file that I can alter and get the results I need.. my python code creates the .html file each time it is run.

So the logic is that : function1 returns table1.html and function2 return table2.html etc...

My problem: I need to create one .html file that will start by displaying table1.html in a browser and within table1.html I need to have buttons that, when clicked, will run another specific function (let's say function3 returning table3.html for example) and displaying it..the buttons should always be present, if it can be.

Note: I don't have any idea how to do this, I am in over my head. I wish I had code to show you what I have tried, but most tutorials only show how to alter the .html after it has been created.. while I need to instruct the html file to have buttons while/before created. (Also to be clear, table1.html wont always look the same.. it is dependent on the function's input)

I hope this makes sense, please feel free to ask questions if I was not clear enough

How do I check what version of Python is running my script?
How to create an HTML button that acts like a link?
How to make a Python script standalone executable to run without ANY dependency?
best practice for passing values between functions in Python
Creating a singleton in Python
“Large data” work flows using pandas
How to call the jQuery module functions?