Re: [Python.NET] How to embed properly using Python for .NET

2014-10-06 Thread Denis Akhiyarov
here is a related SO question: http://stackoverflow.com/questions/25101718 On Mon, Oct 6, 2014 at 8:51 AM, Denis Akhiyarov wrote: > It turned out that PTVS was stepping through the use-handled exceptions > for module imports, so the problem was not here. > > The original problem is that when imp

[Python.NET] import Python module in C# - multiple instances, not global/static for the class

2014-10-06 Thread Denis Akhiyarov
Is there any way to import the same Python module as multiple instances, e.g. for each instance of C# class/object? For now it looks like the same module is imported for each instance of C# object (essentially a static Python object) when I do this: using (Py.GIL()) { d

Re: [Python.NET] How to embed properly using Python for .NET

2014-10-06 Thread Denis Akhiyarov
It turned out that PTVS was stepping through the use-handled exceptions for module imports, so the problem was not here. The original problem is that when importing modules as .py* files, then it fails. The only way it works is when the module is setup as a package with corresponding __init__.py f