hello : i'm trying to transfer binary-data from a zope File object to a ExtFile object ... just have problems with Input-Output. any ideas how to handle this? urs.beyeler
i'm trying to transfer binary-data from a zope File object to a ExtFile object ... just have problems with Input-Output. any ideas how to handle this?
urs, you aren't very specific with the problems you are having, but I'll have a guess that you are getting errors when you call manage_addExtFile() and use an existing zope object (the 'File' object) as your 'file' argument. I had this trouble (with ExtImage as it happens), but Gregor pointed me in the direction of StringIO. If you pass in a StringIO instance containing your binary data, all should be sweet. I think this means you'll either have to use an External Method, or allow StringIO to be imported into python scripts. hth tim
Here's how I solved the problem when I has the same issue http://vsbabu.org/webdev/zopedev/zodb2ext.html -vsb On Wed, Feb 13, 2002 at 02:50:27PM +0100, urs wrote:
hello :
i'm trying to transfer binary-data from a zope File object to a ExtFile object ... just have problems with Input-Output. any ideas how to handle this?
urs.beyeler
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
At 13.02.2002 14:50 +0100, urs wrote:
i'm trying to transfer binary-data from a zope File object to a ExtFile object ... just have problems with Input-Output. any ideas how to handle this?
See my External Method to convert an Image to an ExtImage. Modify as you see fit. http://www.zope.org/Members/shh/Patches/toExtImage.py HTH, Stefan
participants (4)
-
Stefan H. Holek -
Tim Hicks -
urs -
vsbabuļ¼ vsbabu.org