how to call a python program from html -


i have form in html action = "pyth.py"

and pyth.py is

#!/usr/bin/python print('content-type: text/html\r\n\r') print('<html><head></head><body>my first page</body></html>') 

so when click submit in form should run pyth.py , should give me html output. not. please me

you have run python script in cgi-bin of webserver. html form action should action="/cgi-bin/pyth.py". check out tutorial.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -