Re: [Python.NET] Inheriting from abstract .NET class

2016-09-26 Thread Denis Akhiyarov
Hi Henning, This feature was implemented by @tonyroberts in 2013 and is tested in CI with test_subclass.py file. According to these tests, the missing piece in your code is defining explicitly __namespace__ on the .NET class derived in Python: In [11]: class StringDoor1(Door): : __nam

Re: [Python.NET] call python in Visual C# WinForm application

2016-09-26 Thread Denis Akhiyarov
@solospirit: You are doing illegal things with Python and believe me - it bites back :) Remember that in Python you cannot just import modules (.py) just from arbitrary paths, unless you are using importlib or sys.path. Hence here is the correct workflow using sys.path: *Microsoft (R) Roslyn C#

Re: [Python.NET] Inheriting from abstract .NET class

2016-09-26 Thread Henning Moeller
Hi Denis, Thanks for your fast response. Sounds completely reasonable to me. And this has not been too much of an issue for me. I got rid of the abstract base class simply by providing an “empty” implementation and using a non-abstract base class. No need for meta classes any more. This way, I

[Python.NET] call python in Visual C# WinForm application

2016-09-26 Thread solospirit
Hi,I'm using windows 7 64bit + Visual C#2012 to develop WinForm 32bit application with .Net Framework 4.0. I want to call some python script within my winform application.After read the document, i'm now able to call the following code within my WinForm application, and the result is correct.