script in Linux vs Windows
- From: aurfalien@xxxxxxxxx
- Date: Fri, 8 Oct 2010 14:52:33 -0700
Unsure how to deal with what appears to be \n vs \r issues.
The following code works in Linux;
o = open("axenfs.reg")
n = open("axenfs2.reg", "a")
line = o.readline()
if not line: break
line = line.replace("dword:00000","dword:0000044e")
But in Windows, its one continues line with a bunch of squares in it.
So I add + '\r\n' to my second to last line so it looks like;
n.write(line + '\r\n')
But I still get one continuous line with squares in it.
Any ideas? I've been googing all day to no avail.
Desperately seeking advice.
- Prev by Date: Re: harmful str(bytes)
- Next by Date: Re: Simple database explorer
- Previous by thread: Re: Opening a webpage in the background via webbrowser.open()
- Next by thread: script in Linux vs Windows