As i want to run python script that was called by "action" command in html form ..
my html file(hello.html) is
<html><body>
<form method="get" action="process_form.cgi">
Name: <input type="text" name="name">
<input type="submit" value="Submit">
</form>
</body></html>
and python script(process_form.cgi) is
-----------
#!/usr/bin/python
import cgi
form = cgi.FieldStorage() # instantiate only once!
name = form.getfirst('name', 'empty')
# Avoid script injection escaping the user input
name = cgi.escape(name)
print """\
Content-Type: text/html\n
<html><body>
<p>The submitted name was "%s"</p>
</body></html>
""" ------
All these files are store in var/www/ folder and using
http://localhost/hello.html form in displayed and entering something and submitting it then whole cgi file is displayed (if i use .py extension rather then .cgi then it will just open for downloading)