[Zope] Getting results of External Method

Marie Robichon robichon@esrf.fr
Wed, 07 Aug 2002 12:01:38 +0200


--=====================_13417708==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

Hi all,

I have an External Method that parses a file and put the title, body, list 
of links, list of images into a dictionary.

How do I now go about getting the info out of this dictionary?

If I do a
<dtml-var "filescript(REQUEST)">

it gives me the dictionary itself :

{'title': 'Industrial Co-ordination Office', 'links':  'applications', 
'index', 'partnershipweblinks', 'breakthroughs', 'pdf/applications.pdf', 
'presentation', 'presentation', 'services', 'collaboration', 'workshop', 
'documentation', 'techniques', 'techniques', 'pdf/techniques.pdf', , 
'body':\r\n\r\n Beamlines\r\n\r\n (etc, etc), 'images': ['img/red.gif', 
'img/indcodiv44.gif']}

How do I get the value of each dictionary key back and how do I get rid of 
those horrible '\r\n\r\n".  If I do a dtml-in it tells me that I cannot do 
a dtml-in with strings.

TIA




Marie Robichon

Web Task Force
European Synchrotron Radiation Facility
BP 220
38043 Grenoble Cedex
France

http://www.esrf.fr

Tel: (33) 04 76 88 21 86
Fax: (33) 04 76 88 24 27 
--=====================_13417708==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
Hi all,<br>
<br>
I have an External Method that parses a file and put the title, body,
list of links, list of images into a dictionary.<br>
<br>
How do I now go about getting the info out of this dictionary?<br>
<br>
If I do a <br>
&lt;dtml-var &quot;filescript(REQUEST)&quot;&gt;<br>
<br>
it gives me the dictionary itself :<br>
<br>
{'title': 'Industrial Co-ordination Office', 'links':&nbsp;
'applications', 'index', 'partnershipweblinks', 'breakthroughs',
'pdf/applications.pdf', 'presentation', 'presentation', 'services',
'collaboration', 'workshop', 'documentation', 'techniques', 'techniques',
'pdf/techniques.pdf', ,
'body':\r\n\r\n<font face="Arial, Helvetica" size=5 color="#FF0000">
Beamlines</font><font face="Arial, Helvetica">\r\n\r\n (etc, etc)</font>,
'images': ['img/red.gif', 'img/indcodiv44.gif']} <br>
<br>
How do I get the value of each dictionary key back and how do I get rid
of those horrible '\r\n\r\n&quot;.&nbsp; If I do a dtml-in it tells me
that I cannot do a dtml-in with strings.<br>
<br>
TIA<br>
<br>
<br>
<br>
<br>
<div>Marie Robichon</div>
<br>
<div>Web Task Force</div>
<div>European Synchrotron Radiation Facility</div>
<div>BP 220</div>
<div>38043 Grenoble Cedex</div>
<div>France</div>
<br>
<div><a href="http://www.esrf.fr/" EUDORA=AUTOURL>http://www.esrf.fr</a></div>
<br>
<div>Tel: (33) 04 76 88 21 86</div>
Fax: (33) 04 76 88 24 27
</html>

--=====================_13417708==_.ALT--