<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Denis,</p>
<p><br>
</p>
<p>There is no licenses term.  I simply used github to save files to work on between home and work.  it is free to use by anyone.</p>
<p><br>
</p>
<p>Since the current pythonnet does not really allow derive from class derived from .NET class. I can't really do what I intended to do, and therefore, I have not spent time on it further. I don't know much about the internal of python to contribute to correct
 the problem. </p>
<p><br>
</p>
<p>The framework currently in github does work fine using ExpandoObject class directly. so it would be ok to be used for simpler program. </p>
<p><br>
</p>
<p>Regards,</p>
<p><br>
</p>
<p>Hansong</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Denis Akhiyarov <denis.akhiyarov@gmail.com><br>
<b>Sent:</b> Thursday, August 25, 2016 11:15:37 AM<br>
<b>To:</b> A list for users and developers of Python for .NET<br>
<b>Cc:</b> hhspiny@pine.cc<br>
<b>Subject:</b> Re: [Python.NET] "Incorrect" behavior of inheriting from class which is inherited from .Net class</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div><b>Hi Hansong, </b><br>
</div>
<div><br>
</div>
I noticed that you (@hhspiny) released your WPF adventures with pythonnet on github, but without a license: 
<div><br>
</div>
<div><a href="https://github.com/hhspiny/WPFPy">https://github.com/hhspiny/WPFPy</a><br>
</div>
<div><br>
</div>
<div>Can you please indicate the license?</div>
<div><br>
</div>
<div><b>Hi Tony,</b></div>
<div><br>
</div>
<div>Please let me know how this subclassing (.NET -> Python -> Python) would work?</div>
<div><br>
</div>
<div><b>Thanks,</b></div>
<div><b>Denis</b></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Apr 11, 2016 at 2:04 AM, Tony Roberts <span dir="ltr">
<<a href="mailto:tony@pyxll.com" target="_blank">tony@pyxll.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
yes, deriving from a python class in Python that itself is derived from a .net class doesn't work. Apologies, if I'd known that was what you were doing I could have saved you some time by telling you that earlier.<br>
<br>
AFAIK this hasn't been created as an issue in github, so please if you could do that that would be helpful. It's probably not that hard to make work, but it's not something I've got time to look at myself right now I'm afraid. If anyone else wants to have a
 go and needs pointing in the right direction let me know.<br>
<br>
Tony<br>
<div class="gmail_quote">
<div dir="ltr">On Mon, Apr 11, 2016 at 3:41 AM Hansong Huang <<a href="mailto:hhspiny@live.com" target="_blank">hhspiny@live.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div dir="ltr">Hello,
<div><br>
</div>
<div>This is related to previous investigation of inheriting from .NET interface class to create WPF MVVM structure.  As now I believe it has nothing to do with interface class, but instead caused by inheriting from .Net class overall. </div>
<div><br>
</div>
<div>please see the following code</div>
<div><br>
</div>
<div>import clr, System</div>
<div>
<div>class baseNA(System.Random):</div>
<div>    __namespace__ = "BaseNA"</div>
<div>    def __init__(self):</div>
<div>        super(baseNA,self).__init__()</div>
<div>#    @clr.clrmethod(System.String,<wbr>[])</div>
<div>    def ToString(self):</div>
<div>        return "string"</div>
<div><br>
</div>
<div>class baseNB(baseNA):</div>
<div>    __namespace__ = "BaseNB"</div>
<div>    def __init__(self):</div>
<div>        super(baseNB,self).__init__()</div>
<div>bna = baseNA()</div>
<div>print bna.ToString()</div>
<div>print bna._Random__ToString()</div>
<div>bnb = baseNB()</div>
<div>print bnb.ToString()</div>
<div>print bnb._baseNA__ToString()</div>
<div>print bnb._Random__ToString()</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>This produces the following output</div>
<div>
<div>string</div>
<div>BaseNA.baseNA</div>
<div>BaseNB.baseNB</div>
<div>BaseNB.baseNB</div>
<div>BaseNB.baseNB</div>
</div>
<div><br>
</div>
<div>as you see, while baseNA -- the first level inherited class works fine. ToString() overrides System.Random.ToString()</div>
<div><br>
</div>
<div>But baseNB inherited from baseNA did not inherit ToString() method from baseNA, but rather inherited from System.Random.  </div>
<div><br>
</div>
<div>Not sure if it is a bug in <a href="http://python.net" target="_blank">python.net</a> or was intended. </div>
<div><br>
</div>
<div>regards,</div>
<div><br>
</div>
<div>Hansong</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
______________________________<wbr>___________________<br>
Python.NET mailing list - <a href="mailto:PythonDotNet@python.org" target="_blank">
PythonDotNet@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/pythondotnet" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/pythondotnet</a></blockquote>
</div>
<br>
______________________________<wbr>___________________<br>
Python.NET mailing list - <a href="mailto:PythonDotNet@python.org">PythonDotNet@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/pythondotnet" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/pythondotnet</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</body>
</html>