Hi.. thanks for replying and thanks for the help
I didn't realize that I mis type the code. The code what suppose to be ..
 tfw = open(imageDataFile, "r")
so, what your saying is that I don't need to open the file that I wanted to read into and extract the data? But how can that be?
I originally used tried by extracting info from a file on the computer and it works. But I couldn't do the same thing from the web.. I don't get that I did wrong or missing...
How would you write the external method if you were to read a text file that you store in ZOPE database and extract the infromation line by line?

Andreas Jung <[EMAIL PROTECTED]> wrote:

--On 25. Februar 2006 21:55:24 -0800 Allen Huang <[EMAIL PROTECTED]>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

Yahoo! Mail
Use Photomail to share photos without annoying attachments.
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to