<div>Ok but i have this form:</div>
<div><head><br><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><br><title>Documento sin t&iacute;tulo</title><br></head></div>
<div>
<p><body><br><form id="form1" name="form1" method="post" action="/cgi-bin/search.py"><br> <label><strong> search</strong> <br> <input type="text" name="textfield" align="center" />
<br> </label><br> <p>&nbsp;</p><br> <label><strong>find it</strong><br> <input type="submit" name="Submit" value="Enviar" /><br> </label>
<br> <p>&nbsp;</p><br></form><br></body><br></html></p>
<p> </p>
<p>And i do not how to find the file looking for the user and list the file to can download it.Can you give me an example ???? </p>
<p>Sorry to be a newbie !!!<br></p><br><br> </div>
<div><span class="gmail_quote">On 7/4/07, <b class="gmail_sendername">Alan Gauld</b> <<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Just set the current directory to the one you want to search using<br><br>os.chdir(myPath)<br><br>or pass a full path to glob:
<br><br>glob.glob("/some/path/to/search/*.txt")<br><br>HTH,<br><br>Alan G.<br><br>"Alejandro Decchi" <<a href="mailto:adecchi@gmail.com">adecchi@gmail.com</a>> wrote in message<br>news:a1885f340707041127j39756c40j256762f6c1350812@mail.gmail.com
...<br>> perfect but can you give me a link to find a file in a<br>> directory.Because i<br>> do not the function to search files in some directory. Can you give<br>> an<br>> example :<br>><br>> On 7/4/07, Alan Gauld <
<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>> wrote:<br>>><br>>><br>>> "Alejandro Decchi" <<a href="mailto:adecchi@gmail.com">adecchi@gmail.com</a>> wrote<br>
>><br>>> > Is the word or part of the word that the user enters in the<br>>> > texbox .<br>>> > And this word is the name of the file to be found<br>>><br>>> Ok, In that case use the glob function in the glob module.
<br>>> It returns a list of all files that match a pattern:<br>>><br>>> >>> import glob<br>>> >>> files = glob.glob("*.txt")<br>>> >>> print files<br>>>
<br>>> For more powerful searches you can use os.walk()<br>>><br>>> See the OS topic in my tutorial for more examples of<br>>> using glob and os.walk<br>>><br>>> HTH,<br>>><br>>> --
<br>>> Alan Gauld<br>>> Author of the Learn to Program web site<br>>> <a href="http://www.freenetpages.co.uk/hp/alan.gauld">http://www.freenetpages.co.uk/hp/alan.gauld</a><br>>><br>>><br>>> _______________________________________________
<br>>> Tutor maillist - <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>>> <a href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor</a><br>>><br>>
<br><br><br>--------------------------------------------------------------------------------<br><br><br>> _______________________________________________<br>> Tutor maillist - <a href="mailto:Tutor@python.org">Tutor@python.org
</a><br>> <a href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor</a><br>><br><br><br>_______________________________________________<br>Tutor maillist - <a href="mailto:Tutor@python.org">
Tutor@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor</a><br></blockquote></div><br>