[IronPython] How to get the result of callback

Bing Li dreamwinterlb at gmail.com
Fri Aug 10 07:27:02 CEST 2007


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

"CheckNumber = x,y:x>y"

So, I want to use C# to execute the expression, I wirte a following function
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://mail.python.org/pipermail/ironpython-users/attachments/20070810/9ab6ad33/attachment.html>

More information about the Ironpython-users mailing list