[Zope-dev] Return anything but strings from a method??

Thomas Weholt thomas@cintra.no
Sun, 14 May 2000 02:38:32 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_0009_01BFBD4D.7EBB5180
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I got a method in a product that should be able to return a list, a =
tuple or a dictionary but I cannot seem to use them in the same way as =
in plain python. Is there anything I should be aware of?

I got a disk-based dictionary ( Berkley DB ) in which I`ve stored =
several customized classes? If I return a list of objects like this, how =
could I access this in DTML-code?

If somebody could give me an example on how you can return a little more =
than just a string from a method to a dtml-document/method I`d be =
grateful. At the moment nothing but plain strings seem to work.

Thomas



------=_NextPart_000_0009_01BFBD4D.7EBB5180
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I got a method in a product that should =
be able to=20
return a list, a tuple or a dictionary but I cannot seem to use them in =
the same=20
way as in plain python. Is there anything I should be aware =
of?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I&nbsp;got a disk-based dictionary ( =
Berkley DB )=20
in which I`ve stored several customized classes? If I return a list of =
objects=20
like this, how could I access this in&nbsp;DTML-code?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>If somebody could give me an example on =
how you can=20
return a little more than just a string from a method to a =
dtml-document/method=20
I`d be grateful. At the moment nothing but plain strings seem to=20
work.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thomas</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0009_01BFBD4D.7EBB5180--