[IronPython] .NET can see Python classes?

Ori oorrii at gmail.com
Sun Aug 5 06:57:49 CEST 2007

you can try the following code:

PythonEngine engine = new PythonEngine();
EngineModule module = engine.CreateModule();
engine.Execute(handleCode(code, def), module); # code contains definition
for python class 'PyClass'
UserType ptype = module.Globals["PyClass"] as UserType;
object obj = Ops.Call(ptype);

Darren Govoni-2 wrote:
> Hi,
>   Can .NET see python defined classes or objects? I define a class in
> Python
> but one of my .NET classes tries to find it via reflection and it cannot.
> I saw a post about this that is over a year old saying it was not then
> supported.
> Could this possible in IP 2.0?
> thank you,
> D
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

View this message in context: http://www.nabble.com/-IronPython--.NET-can-see-Python-classes--tf4218815.html#a12002302
Sent from the IronPython mailing list archive at Nabble.com.

More information about the Ironpython-users mailing list