[Zope] Return a image instance from script
Christoph Landwehr
chris-zopemailing at gmx.de
Tue Dec 23 06:24:30 EST 2003
Hi Tino,
>> In Zope:
>> def test():
>> foo=open('new.gif')
>> return foo
> I really doubt the open() part here.
>
You are absolutely right.
It is:
def test():
>> foo=container.new_gif
>> return foo
> No, it just uses repr() here, which maps to the objects __str__
> Method which happens to render a HTML tag for the image.
> It depends on what you want to do with it.
I want to pass a file object to an external method to use PIL. Since I can not
use StringIO within Zope I need to pass an appropriate object to the external
method and do the StringIO in the external method.
Regards
Christoph
More information about the Zope
mailing list