<pre>Pessoal isto é completamente fora da lista, e nem sei se é ético, mas achei interessante este caso.<br><br>Abraços,<br><br>Solli M. Honório<br><br>Mike Cariaso:<br>><i> After moving from perl to python I find I miss the ability to do a
<br></i>><i><br></i>><i> while (<>) { }<br></i><br>Look at 'fileinput' in the standard library.<br><br>However, using it will be slower than using, say<br><br>try:<br> args, filenames =
getopt.getopt ...<br>except getopt.error:<br> ...<br><br>if not filenames:<br> filenames = ["-"]<br><br>for filename in filenames:<br> if filename == "-":<br> infile = sys.stdin<br> else:<br>
infile = file(filename)<br> for line in infile:<br><br> ...</pre>