<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>In your python script:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>mlist = context.code(uparam)</FONT></DIV>
<DIV><FONT face=Arial size=2><do something with mlist here></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>In your external method:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>def code(self, uparam):</FONT></DIV>
<DIV><FONT face=Arial size=2> mlist = []</FONT></DIV>
<DIV><FONT face=Arial size=2> <process input parameter,
build mlist)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> return mlist</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Simple!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>hth</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Jonathan</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=cpdm@rediffmail.com href="mailto:cpdm@rediffmail.com">cpdm cadlab</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=zope@zope.org
href="mailto:zope@zope.org">zope@zope.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, September 06, 2006 6:27
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Zope] Need Help--urgently</DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial
size=2></FONT><FONT face=Arial size=2></FONT><BR></DIV>I am sure it should be
trivial, but being newbee makes me shameless :)<BR> What I
am in need of is guideline about how to integrate python script and external
python method.<BR> I have a form through which I collect
user input and forward it to a python script, which concatenates input in
certain pattern and feeds it to external method. Now external
method runs fine and puts the results in a list called mlist. What I want to
know is how do I fetch the "return mlist" resulting
from external method back to the python script which gave the input to it for
processing.<BR><BR> The python script is named which
searchuparam which gets user input from form and does something like
this:<BR>uparam = str(0) + "," + str(0) + "," + str(1) + "," + str(0) + "," +
str(0) + "," + str(DO)
\<BR> + ","
+ str(NL) + "," + str(0) + "," + str(0) + "," + str(0) + "," + str(0)
\<BR> + ","
+ str(TIME) + "," + str(WM) + "," + str(NOP) + "," + str(EXP) + "," +
str(GKH)<BR>context.code(uparam)<BR><BR>code is the id of external method
which processes uparam and at the end has statement <BR>return
mlist<BR> this mlist is what I am interested in getting back. I
want external method to return me this list to my python script searchuparam.
I tried reading and did google last week but without success. Any help is
appreciated. <BR>TIA.<BR><BR>yours <BR>md<BR><BR><A
href="http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/1507191490@Middle5?PARTNER=3"><IMG
hspace=0
src="http://adworks.rediff.com/cgi-bin/AdWorks/sigimpress.cgi/www.rediff.com/signature-home.htm/1963059423@Middle5?OAS_query=null&PARTNER=3"
border=0></A>
<P>
<HR>
<P></P>_______________________________________________<BR>Zope maillist
-
Zope@zope.org<BR>http://mail.zope.org/mailman/listinfo/zope<BR>**
No cross posts or HTML encoding! **<BR>(Related lists -
<BR> http://mail.zope.org/mailman/listinfo/zope-announce<BR> http://mail.zope.org/mailman/listinfo/zope-dev
)<BR></BLOCKQUOTE></BODY></HTML>