[Zope] Extracting just the string of the zope file or dtml object

Adam Warner lists@consulting.net.nz
11 Sep 2001 00:27:08 +1200


On Mon, 2001-09-10 at 23:48, Andy Bulka wrote:
> How do I ensure that the string *contents* of my Zope object is passed to an
> external method, rather than passing the zope object itself?

Andy, you will know a lot more than me since I've only been using
external methods for a couple of days. I do know you could approach it
this way:

In the external python script try this:

s = str(objectname.data)

Which will extract the data stream from the object and turn it into a
string.

Your def's should also have "self" in them. That is:

def safetest(self, object):

I understand the self is all that is needed for you to be able to access
the zope database in the external method.

Regards,
Adam