[Pythonmac-SIG] lambda functions in embedded python

Etienne Antoniutti Di Muro etienne@usablenet.com
Wed, 28 Feb 2001 18:46:31 +0100


Dear list members,
I would like to make a call to the "filter" function of the __builtin__ module from
a C routine that embeds python.

No problems for making the call, but do not know how to define the arguments:

Syntax is: filter(function, list)
I got the list, It comes out of some Python evaluation, itself;
I'd like to use a lambda function for filtering. How do I define the "lambda"
in a python C-embedded envirorment??

I need also the filtered list back in my C routine, for further use.

Is this worthy instead of rebuilding the list with the PyList_.... set of functions
and some if....else... stratement, to filter "manually" the unwanted items??

Any suggestion?

thanx in advance
etienne


--
      it's time to leave this town
      it's time to steal away
      let's  go get lost
      anywhere in the U.S.A.   (RHCP)