easy question on input files in Python
bragi at hks.com
Wed Dec 6 16:35:46 EST 2000
handle = open('file.inp', 'r')
lines = handle.readlines()
for line in lines:
or in a while loop.
line = handle.readline()
if not line:
jsolack at my-deja.com wrote:
> I am just messing around with Python and I only have the tutorial off
> of python.org. I was wondering how I would set up a while loop that
> says "while not end of file" in python? I would like to read through
> an input file and i do not know the sytax for that! Thanks!
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Hibbitt, Karlsson, & Sorensen, Inc.
web: www.hks.com mailto: bragi at hks.com
Phone: (401) 727-4380 x5586 Fax: (401) 727-4208
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list