<div><span class="gmail_quote">On 8/4/07, <b class="gmail_sendername">Darren Govoni</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:darren@ontrenet.com" target="_blank">darren@ontrenet.com</a>
&gt; wrote:</span> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">&nbsp; Can .NET see python defined classes or objects? I define a class in Python</font></div>
<div><font face="Arial" size="2">but one of my .NET classes tries to find it via reflection and it cannot.</font></div>
<div><font face="Arial" size="2">I saw a post about this that is over a year old saying it was not then supported.</font></div></div></blockquote>
<div>&nbsp;</div>
<div>The fundamental issue here is that Python classes don&#39;t follow the same semantics as CLR classes.&nbsp; They are, for instance, mutable after construction in ways that CLR classes are not.&nbsp; In order to expose a Python class directly to the CLR, it would have to be &quot;frozen&quot; in some manner, and you might prefer to be able to specify the types of the parameters instead of dealing with everything as &quot;object&quot;.&nbsp; This would require some sort of non-Python syntax to accomplish.&nbsp; Fortunately, there already is such a thing: a CLR interface.&nbsp; Define an interface in an external assembly and you can derive from it in Python.&nbsp; Your CLR classes can then access the Python code through the interface.
</div>
<div>&nbsp;</div>
<div>--</div>
<div>Curt Hagenlocher</div>
<div><a href="mailto:curt@hagenlocher.org">curt@hagenlocher.org</a></div></div>