Several ways, of course. If you already have the HTML page, just modify the buttons to point to a node-red http endpoint (e.g.
http://nodered_host:1880/button/1) passing the button number on the url path.
Then if you create a flow that starts with an
http in node, set it's path to be
/button/:id -- then every time one of the buttons is pressed, your flow can access the button id through the
msg.req.params.id property. Based on that you can switch to the correct python script node.
Just keep in mind that every http input flow needs to end with an
http response node, set to return an appropriate status (200 ok, or 204 no content, even 500 error). Also, make sure you don't wipe out the
msg.res properties in your flow, or else the response will never get back to the client.