On 8/4/07, Darren Govoni <[EMAIL PROTECTED]> wrote: > > 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. >
The fundamental issue here is that Python classes don't follow the same semantics as CLR classes. They are, for instance, mutable after construction in ways that CLR classes are not. In order to expose a Python class directly to the CLR, it would have to be "frozen" in some manner, and you might prefer to be able to specify the types of the parameters instead of dealing with everything as "object". This would require some sort of non-Python syntax to accomplish. Fortunately, there already is such a thing: a CLR interface. Define an interface in an external assembly and you can derive from it in Python. Your CLR classes can then access the Python code through the interface. -- Curt Hagenlocher [EMAIL PROTECTED]
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com