[Python.NET] IronPython Embeddied .NET 4.0, how to transfer object from C# into Ironpython and back again

riscy00 riscy00 at gmail.com
Thu May 17 15:01:36 CEST 2012


I'm learning more about data/object transfer between C# and ironpython (under
embedded within NET4)

I have class object instance containing Dictionary<T> implementation with
data such as "XDATA:67, YDATA:12,ZDATA:66"

I also have test.py filename which is loaded into C#'s IRONPYTHON (using var
and dynamic method). I was curious how to transfer data within the class
object into Python (reference class or a copy?) which do various processing
(ie ZDATA=YDATA+XDATA) and then return result within the same class (rather
than value)

Is this possible, if so please demonstrate code example in C# and python.

How to make sure both Dictionary within C# is the same as python?

The whole aim is to pass object instance into python and do operation task
using object data and then pass data back into class and make it available
to return object back to the C# for further processing. 

I wondered if this can this be done by mean of reference (rather than copy?,
faster and more compact this way perhaps).





--
View this message in context: http://python.6.n6.nabble.com/IronPython-Embeddied-NET-4-0-how-to-transfer-object-from-C-into-Ironpython-and-back-again-tp4974924.html
Sent from the Python - pythondotnet mailing list archive at Nabble.com.


More information about the PythonDotNet mailing list