<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
handle = open('file.inp', 'r')
<br>lines = handle.readlines()
<br>for line in lines:
<br>   print line
<p>or in a while loop.
<p>while 1:
<br>    line = handle.readline()
<br>    if line:
<br>        print line
<br>     if not line:
<br>        break
<p>Bragi
<br> 
<p>jsolack@my-deja.com wrote:
<blockquote TYPE=CITE>I am just messing around with Python and I only have
the tutorial off
<br>of python.org.  I was wondering how I would set up a while loop
that
<br>says "while not end of file" in python?  I would like to read
through
<br>an input file and i do not know the sytax for that!  Thanks!
<p>Jason
<p>Sent via Deja.com <a href="http://www.deja.com/">http://www.deja.com/</a>
<br>Before you buy.</blockquote>

<pre>-- 
___________________________________________________

Bragi Baldursson               
Hibbitt, Karlsson, & Sorensen, Inc. 
web:  www.hks.com             mailto: bragi@hks.com
Phone: (401) 727-4380 x5586   Fax: (401) 727-4208
___________________________________________________</pre>
 </html>