[IronPython] IP 2.7b1 - Accessing C# variables from Python

Ron Lindsey ron at emirot.com
Wed Jan 5 20:21:08 CET 2011


I have written an OpenGL 3D modeling program in C#/OpenTK. In the 
program, I store all the objects (box, sphere, tube, etc) the user 
created into a hashtable. Each object stored is of type Box, Sphere etc...

I am embedding IronPython to give the user a way to animate their 
models. So in IronPython, the user needs to have access to the objects 
in the hashtable to get/set properties of the different objects.

Once the script is written, they then will run it. as the script 
executes, it will control the objects in the hashtable, which in turn 
will move the 3D models in the screen.

I have looked/googled/read but have not found out a way to access a C# 
hashtable and the objects stored with in it.

Any ideas?
-- 
Thanks, Ron Lindsey



More information about the Ironpython-users mailing list