Re: [Python.NET] How to pass a Type to a method?

2013-01-24 Thread Daniel Krause
Wow, I tried so many different variants, but this I must have missed! Thanks, it works! 2013/1/24 Tribble, Brett > I don’t think the python.net clr module supports most of the methods etc. > that the IronPython one does: > > ** ** > > http://nullege.com/codes/search/clr > > ** ** > > C

Re: [Python.NET] How to pass a Type to a method?

2013-01-24 Thread Tribble, Brett
I don't think the python.net clr module supports most of the methods etc. that the IronPython one does: http://nullege.com/codes/search/clr Can you use the following instead? import System ... ... array = Array.CreateInstance(System.Int32, rows, columns) From: PythonDotNet [mailto:pythondotne

[Python.NET] How to pass a Type to a method?

2013-01-24 Thread Daniel Krause
I would like to use System.Array. The following code is running with iron python import clr import System from System import Array from System import Int32 from clr import GetClrType rows = 1 columns = 2 #method: Array.CreateInstance(Type, Int32, Int32) array = Array.CreateInstance(GetClrType(Int

Re: [Python.NET] Problem with System.ArgumentException in call to method from dll

2013-01-24 Thread Barton
Two things spring instantly to mind (thanks for the reminder) 1) A patch has been submitted that tries very cleverly to allow out params to be omitted. This sounds like it's worth pursuing. 2) iPy's Reference type is something that I looked into implementing which would (or could) allow the wrap

Re: [Python.NET] Problem with System.ArgumentException in call to method from dll

2013-01-24 Thread Barton
Because the Python.Runtime library also provides means of embedding python in a .NET program using pinvoke to call the native python dll, it is, by nature, "unsafe". On 01/22/2013 05:00 PM, b...@fie.us wrote: Just to clarify: neither version of th