IOError:[Errno 27] File too large
ch.valderanis at gmail.com
ch.valderanis at gmail.com
Wed Mar 13 12:53:17 EDT 2013
Hi,
Relatively newcomer here.
The following code fails with the above error:
python version used 2.6.2 under linux
filestring='somestring'
for files in glob.glob('*'):
f2=open(files.replace('.xml','.sub'),'w')
f2.write(filestring+files)
f2.close()
The glob commands returns around 10k files.
I want to create 10k new files. the filename should have a different extension (sub instead of xml)and the content of the new file should be some filestring with the addition of the original filename.
I am pretty sure that the files is less than 1kB. Is there another reason for the operation to fail?
Any other comments,remarks welcomed.
Thanks,
Makis
More information about the Python-list
mailing list