26 Feb
2006
26 Feb
'06
10:37 a.m.
--On 25. Februar 2006 21:55:24 -0800 Allen Huang <swapp0@yahoo.com> wrote:
imageDataFile=StringIO(str(imageData.data)) tfw = open(imageDataFile, "r")
Please consult the StringIO documentation. There is no need to open() a StringIO instance...also your code makes little sense to me because str() already returns a string which is usually what you need and want. Why do you have the need to put the image data into a StringIO instance. And another point: you should always use cStringIO instead of StringIO (for performance reasons)...consult the Python Library reference for details. -aj