TypeError for argument type IList <dynamic>
Hi, I'm new to Python for .NET and to this mailing list. From the search results to my question I see I'm not the first person with my problem, yet the solution still evades me. When using the following function without AuxParameters everything works fine bool CalculateResult(string resultName, IntPtr resultArray, IList <dynamic> AuxParameters = null) but in cases where I do need a parameter I get a "TypeError: No method matches given arguments for CalculateResult". Any ideas how I can make this work? Here's what I tried: from System import Array, Int16 from System.Runtime.InteropServices import GCHandle, GCHandleType resultName = 'ABCD' result_index = 50 # set 0 if not needed! par = [result_index] a = [0] * 100 arr = Array[Int16](a) arr_hndl = GCHandle.Alloc(arr, GCHandleType.Pinned) ptr_arr = arr_hndl.AddrOfPinnedObject() if result_index: CalculateResult(resultName, ptr_arr, par) else: CalculateResult(resultName, arr) Thanks for any help, Greg
participants (1)
-
gregor.hd@gmx.de