HTML FORM AND PYTHON

subhabrata.iisc at hotmail.com subhabrata.iisc at hotmail.com
Fri Jun 13 03:12:47 EDT 2008


Dear Members of the group,
I have a small question, if you can help me to find the answer.
I have one function:
def add_string(n):
        print “Print Two strings”
        print “Print the First String”
        a1=raw_input(“PRINT THE FIRST STRING”)
        a2=raw_input(“PRINT THE SECOND STRING”)
        print “CONCATENATING THE TWO GIVEN STRINGS”
        a3=a1+a2
        print “THE RESULT IS”
        print a3

Now, I have designed one HTML form which has two input fields for text
and an output field for the result.

I like to bind the python program into HTML form.
i) Is there any way I can keep both my existing python code and HTML
code and bind them? If any one can suggest with example.
ii) Do I have to write the whole code in a way in python so that it
would work the function as well as generate HTML form I am looking
for? If any one can suggest with example.
iii) Is there any other way?
Best Regards,
Subhabrata.



More information about the Python-list mailing list