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

Daniel Jennings danielj at arena.net
Wed Jan 5 20:22:19 CET 2011

Have you tried just treating it like a regular Python dictionary? I thought that's all I had to do, though I work with Dictionary<K,V>, not Hashtable objects.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ron Lindsey
Sent: Wednesday, January 05, 2011 11:21 AM
To: users at lists.ironpython.com
Subject: [IronPython] IP 2.7b1 - Accessing C# variables from Python

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
Users mailing list
Users at lists.ironpython.com

More information about the Ironpython-users mailing list