Re: Newline at EOF Removal

2006-01-09 Thread Alex N
Actually Im doing a process with PHP, Unicode, Ansi. I am trying to format these text files to be acceptable to PHP. The first process is to strip the unicode and convert to ansi. But there are blank lines in the file and at the end of the file. I was just having trouble with the lines at the end.

Re: Newline at EOF Removal

2006-01-09 Thread Alex N
Thank you guys for all your help. Was able to nail it down. uh I dunno where i saw the 'wt' at. somewhere online though. I have to do it in 2 stages though and run through a coula files but it works. import re f = open("oldfile.txt") w = open("newfile.txt", "w") for line in f: if line.strip():

Re: Need a little parse help

2005-05-10 Thread Alex N
That worked! Thank you so much! -- http://mail.python.org/mailman/listinfo/python-list

Re: F.readline

2005-05-05 Thread Alex N
Erik Max Francis wrote: > Robert Kern wrote: > > > There is no such command built in. You will have to build it yourself > > out of the components that are available. > > linecache is probably what he's looking for. > > -- > Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ > Sa