Re: [Tutor] lst file

2008-01-24 Thread Alan Gauld
"SwartMumba snake" <[EMAIL PROTECTED]> wrote > 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. Wjat kind of content? Have you opened it in a text editor and looked at it? You are reading the fi

Re: [Tutor] lst file

2008-01-24 Thread Remco Gerlich
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

[Tutor] lst file

2008-01-24 Thread SwartMumba snake
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() D