R
Rosario Morgan
Hello
Help is great appreciated in advance.
I need to loop through a file 6000 bytes at a time. I was going to
use the following but do not know how to advance through the file 6000
bytes at a time.
file = open('hotels.xml')
block = file.read(6000)
newblock = re.sub(re.compile(r'<Rate.*?></Rate>'),'',block)
print newblock
I cannot use readlines because the file is 138MB all on one line.
Suggestions?
-Rosario
Help is great appreciated in advance.
I need to loop through a file 6000 bytes at a time. I was going to
use the following but do not know how to advance through the file 6000
bytes at a time.
file = open('hotels.xml')
block = file.read(6000)
newblock = re.sub(re.compile(r'<Rate.*?></Rate>'),'',block)
print newblock
I cannot use readlines because the file is 138MB all on one line.
Suggestions?
-Rosario