cStringIO & write error?
ingo
ingoogni at home.nl
Sat Jul 29 10:20:57 EDT 2000
When I do:
from StringIO import StringIO
f=open('file.dat', 'r+b')
ff=StringIO(f.read(-1))
ff.seek(0,0)
ff.write(chr(123))
all is ok. But when I import from cStringIO I get an error:
line 311, in RunScript
exec codeObject in __main__.__dict__
File "D:\Ingo\PyScript\df3\Script1.py", line 5, in ?
ff.write(chr(123))
AttributeError: write
What am I doing wrong?
TIA,
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
More information about the Python-list
mailing list