cStringIO & write error?

Alex cut_me_out at hotmail.com
Sat Jul 29 17:27:06 EDT 2000


> Thanks, but in my case it doesn't help me further

Sorry, should have been more specific.  What happens if you try this?

from StringIO import StringIO
f=open('file.dat', 'r+b')
ff = StringIO()
ff.write(f.read(-1))
ff.seek(0)
ff.write(chr(123))

Alex.



More information about the Python-list mailing list