Hi folks,<div><br></div><div>I've created a simple method to grab files texts from directory by words random, however I figure out that I need extract the content inside of each file, in fact I believe  I have to create a parsing, nonetheless I don't know how to create a parser.</div>
<div>Please some could share some tips to do it?</div><div>Cheers</div><div>Jayron</div><div>here is the code:</div><div><br></div><div><div># -*- conding: utf-8 -*-</div><div><br></div><div><br></div><div>from subprocess import Popen, PIPE</div>
<div><br></div><div>pesquisa = raw_input(" Digite a pesquisa de interesse: ")</div><div><br></div><div>def Pesquisar(pesquisa):</div><div>    p = Popen(["search", pesquisa],stdout=PIPE)</div><div>    resultado = p.communicate()[0]</div>
<div>    return resultado</div><div><br></div><div><br></div><div>print Pesquisar(pesquisa)</div></div><div><br></div><div><br></div><div><br clear="all"><br>-- <br><i><font color="#006600">" A Vida é arte do Saber...Quem quiser saber tem que </font><font color="#ff0000"><b>Estudar</b></font><font color="#006600">!"</font></i><div>
<br></div><div><a href="http://bucolick.tumblr.com/" target="_blank">http://bucolick.tumblr.com</a></div><div><a href="http://artecultural.wordpress.com/" target="_blank">http://artecultural.wordpress.com/</a></div><br>
</div>