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
Post a Comment