[IronPython] Calling a Python function with passed in args/kwargs from C#
jdhardy at gmail.com
Sat Apr 24 01:41:34 CEST 2010
On Fri, Apr 23, 2010 at 5:27 PM, Dino Viehland <dinov at microsoft.com> wrote:
> I think you want PythonCalls.CallWithKeywordArgs. You'll need an IDictionary<object, object>
> instead of a plain old IDictionary though (or you'll need to unpack the args for the other
> overload). Either way we end up calling this with a binder which should splat both arguments.
That worked perfectly. Thanks, yet again! (Also, splatting is the word
I was looking for - I knew it was something that sounded silly).
How you manage to keep all of these APIs in your head is a mystery to me :).
> If perf is important for this call we could talk about opening up
> PythonContext.Invoke(CallSignature) so you could create a call site which uses whatever
> signature you want.
For now I don't think performance will be an issue, but I'll have to
measure it and see.
More information about the Ironpython-users