User input question

Ken ken at hotmail.com
Thu May 30 05:03:04 EDT 2002


"Ken" <ken at hotmail.com> wrote in message
news:ad4ovf$tqev9$1 at ID-49758.news.dfncis.de...
> Hi, I have a question on user input. Suppose the user need to put in a
> search word like this:
>
> print "<form name=update action=search.cgi method=post>" # I am not sure
if
> this line is right
> print "<br>Search:"
> print """<br><input type="text" name="searchword" size=12 value=%s
> maxlength=50>"""
> print """<input type="SUBMIT" value="SEARCH" name="SEARCH">"""
> print """<input type=reset name="reset" value="reset">"""
> print "</form>
>
> How do I pass searchword to another function with header:
>
> def search_word(word) ?
>
> Thanks
> p.s. i am new to python..... I used to work with C++
>

This is the equilvalent C++ code I want to work in python:

string s;
cin>>s;
search_word(s)

void search_word(string s){
  //do something
}

Thanks





More information about the Python-list mailing list