[IronPython] How to get the result of callback

Bing Li dreamwinterlb at gmail.com
Thu Aug 9 22:27:02 PDT 2007


Hi,guy.

I want to call python lambda expression in C#. The following is lambda
expression.

"CheckNumber = x,y:x>y"

So, I want to use C# to execute the expression, I wirte a following function
that,
The parameter expression is lambada expression, the parameters is a
key-value list. The key is the name of parameter in lambda expression 'x'
and 'y'.
 public object CallPythonLambda(string expression, Hashtable parameters) {
            PythonEngine pe = PythonEngine.CurrentEngine;
            //TODO: not implement.
        }

Can anybody help me to complete the function? By the way, the version of
IronPython is 2.0A3.

Thanks a lot!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ironpython.com/pipermail/users-ironpython.com/attachments/20070810/9ab6ad33/attachment.htm 


More information about the Users mailing list