[Zope] Return a image instance from script

Christoph Landwehr chris-zopemailing at gmx.de
Mon Dec 22 12:48:19 EST 2003


A very simple (?) problem:

from a script I want to pass an image object to an external method.

In Python:
 >>> def test():
...   foo=open('new.gif')
...   return foo
...
 >>> test()
<open file 'new.gif', mode 'r' at 0x80df2e0>


In Zope:
def test():
   foo=open('new.gif')
   return foo

This does not return an instance of the image but
<img src="http://foo.bar.com" alt="" title="" height="10" width="10" border="0" />

Zope's doing some magic. How do I get the image object?


Regards
Christoph




More information about the Zope mailing list