Many things could be wrong; perhaps with reading the file, or the lines, or with printing them... Debugging usually consists of what the problem is exactly, where it occurs.
First thing I'd look at is seeing whether the lines do get read. I would change "print line" into "print len(line)" and see if the lines are empty, or filled with unprintable things. Also, what sort of file is it? Remco On Jan 24, 2008 11:42 AM, SwartMumba snake <[EMAIL PROTECTED]> wrote: > Hi > > I am trying to read from a specific .lst file. When I read from it, it > just prints out blank lines and I am sure that this file contains content. > > This is what I am using to read from the file: > > f = open("C:\\Users\\UserName\\Directory\\words.lst") > > for line in f: > print line > > f.close() > > Do you guys know what is wrong? > > Thanks in advance. > > ------------------------------ > Never miss a thing. Make Yahoo your > homepage.<http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs> > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > >
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor