Re: Beginner question: use function to read text file

2006-06-26 Thread Luke
Thanks to both of you for the help, much appreciated! Luke -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question: use function to read text file

2006-06-26 Thread Gary Herron
Luke wrote: > I'm pretty stuck at the moment and wondering if anyone can spot the problem. > Trying to create a function that will read a text file into a list and > return that list. > > I wrote the following function and saved it as 'fileloader.py' > > def fileload(fname): > infile=open(fna

Re: Beginner question: use function to read text file

2006-06-26 Thread James Stroud
Luke wrote: > I'm pretty stuck at the moment and wondering if anyone can spot the problem. > Trying to create a function that will read a text file into a list and > return that list. > > I wrote the following function and saved it as 'fileloader.py' > > def fileload(fname): > infile=open(f

Beginner question: use function to read text file

2006-06-26 Thread Luke
I'm pretty stuck at the moment and wondering if anyone can spot the problem. Trying to create a function that will read a text file into a list and return that list. I wrote the following function and saved it as 'fileloader.py' def fileload(fname): infile=open(fname) dates =[] time