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