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.
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():
That worked! Thank you so much!
--
http://mail.python.org/mailman/listinfo/python-list
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