[Zope] Need Help--urgently

Jonathan dev101 at magma.ca
Wed Sep 6 18:36:25 EDT 2006


In your python script:

mlist = context.code(uparam)
<do something with mlist here>


In your external method:

def code(self, uparam):
   mlist = []
   <process input parameter, build mlist)

   return mlist


Simple!


hth

Jonathan


  ----- Original Message ----- 
  From: cpdm cadlab 
  To: zope at zope.org 
  Sent: Wednesday, September 06, 2006 6:27 PM
  Subject: [Zope] Need Help--urgently


  I am sure it should be trivial, but being newbee makes me shameless :)
      What I am in need of is guideline about how to integrate python script and external python method.
      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.

       The python script is named which searchuparam which gets user input from form and does something like this:
  uparam = str(0) + "," + str(0) + "," + str(1) + "," + str(0) + "," + str(0) + "," + str(DO) \
              + "," + str(NL) + "," + str(0) + "," + str(0) + "," + str(0) + "," + str(0) \
              + "," + str(TIME) +  "," + str(WM) + "," + str(NOP) + "," + str(EXP) + "," + str(GKH)
  context.code(uparam)

  code is the id of external method which processes uparam and at the end has statement 
  return mlist
     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. 
  TIA.

  yours 
  md




------------------------------------------------------------------------------


  _______________________________________________
  Zope maillist  -  Zope at zope.org
  http://mail.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists - 
   http://mail.zope.org/mailman/listinfo/zope-announce
   http://mail.zope.org/mailman/listinfo/zope-dev )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20060906/3fe68336/attachment.htm


More information about the Zope mailing list