I got a MemoryError when processing a .xml file = 1,45 Gb. I tried to run it on a smaller file and it works, so there shouldn't be any bugs in the code. The code, itself, implies to open a xml file, do some stuff inside and save it back to a new txt file. I run Win7 x86, 2 Gb RAM, Python 2.6
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
openfile('ukwiki-latest-pages-articles.xml')
File "C:\Users\Vof Freeman\Desktop\Python\test.py", line 7, in openfile
contents = F.read()
File "C:\Python26\lib\codecs.py", line 666, in read
return self.reader.read(size)
File "C:\Python26\lib\codecs.py", line 466, in read
newdata = self.stream.read()
MemoryError