[IronPython] Calling a method with arguments from C#
Brandon Furtwangler
furtwan1 at msu.edu
Fri Jan 6 10:08:21 PST 2006
Is it possible to call a python method from C# and pass C# variables as the
arguments? For example py:
def Method3(person):
return person.name
If so how do I call this from C# passing in some C# variable as person?
I'm thinking it should be something like:
pythonEngine.Evaluate("Method3({1})", myPerson);
In other words, I'd expect an overload of Evaluate to act as
Console.WriteLine and do whatever magic is required to link up the
variables.
Ideas? Comments?
-Brandon Furtwangler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/users-ironpython.com/attachments/20060106/0587bed8/attachment.htm
More information about the users
mailing list