Re: [Python.NET] Referencing a DLL

2016-10-17 Thread Artem Zhukov
Hello, the solution was to use [ILSPY](http://ilspy.net/) to investigate the DLL and find dependencies (right click recursively for each DLL). Then I copied all the dependencies to the same folder where the main DLL was. After that, I ran: print [a for a in clr.ListAssemblies(False) and get the li

Re: [Python.NET] Referencing a DLL

2016-10-17 Thread Denis Akhiyarov
Let me post a quick update based on reply from Artem. I hope that he posts more detailed answer tomorrow. On Linux his DLL was missing some references that are available by default on Windows. Adding this reference fixed his problem. Perhaps we should improve error logging in pythonnet, if this i

Re: [Python.NET] Referencing a DLL

2016-10-17 Thread Artem Zhukov
Ubuntu 16.4, Python 2.7.12 Mono 4.2.4 (I used this to install https://github.com/pythonnet/pythonnet/blob/master/.travis.yml) pythonnet (2.2.0.dev1) pythonnet is working correctly. I have another DLL and I able to refer to it with no problems On Mon, Oct 17, 2016 at 5:02 PM Denis Akhiyarov wrote

Re: [Python.NET] Referencing a DLL

2016-10-17 Thread Artem Zhukov
In [6]: clr.AddReference("isc.Eng.Hov") Out[6]: In [7]: import isc.Eng.Hov --- ImportError Traceback (most recent call last) in () > 1 import isc.Eng.Hov ImportError: No module named isc.En

Re: [Python.NET] Referencing a DLL

2016-10-17 Thread Artem Zhukov
On my machine: In [6]: clr.AddReference("isc.Eng.Hov") Out[6]: In [7]: import isc.Eng.Hov --- ImportError Traceback (most recent call last) in () > 1 import isc.Eng.Hov ImportError: No modu

Re: [Python.NET] Referencing a DLL

2016-10-17 Thread Denis Akhiyarov
are you on Linux and Mono? What python/Mono/pythonnet versions and architecture? On Mon, Oct 17, 2016 at 9:57 AM, Artem Zhukov wrote: > In [6]: clr.AddReference("isc.Eng.Hov") > Out[6]: > > In [7]: import isc.Eng.Hov > > -

Re: [Python.NET] Referencing a DLL

2016-10-17 Thread Denis Akhiyarov
I used ILSPY to inspect your dll and here is how you need to use it (just tried and it works!): In [1]: import clr In [2]: import sys In [3]: sys.path.append(r"C:\Users\denis.akhiyarov\Downloads\TestEngine_Compile ...: d") In [4]: clr.AddReference("isc.Eng.Hov") Out[4]: In [5]: import isc.

Re: [Python.NET] Referencing a DLL

2016-10-17 Thread Artem Zhukov
Denis, 1. from isc.Eng.Hov import * . Result: ImportError: No module named isc.Eng.Hov 2. import HovEngine. Result: ImportError: No module named HovEngine 3. import isc.Eng.Hov.HovEngine. Result: ImportError: No module named isc.Eng.Hov.HovEngine 4. from isc.Eng.Hov.HovEngine import *. Result Impo

Re: [Python.NET] Referencing a DLL

2016-10-17 Thread Denis Akhiyarov
Hi Artem, If clr.FindAssembly("isc.Eng.Hov") and clr.AddReference("isc.Eng.Hov") are working fine, then you need to `import HovEngine`, but not `import isc.Eng.Hov`. This is assuming isc.Eng.Hov is assembly name, and HovEngine is namespace name. Thanks, Denis On Mon, Oct 17, 2016, 12:08 AM Arte

[Python.NET] Referencing a DLL

2016-10-16 Thread Artem Zhukov
Hello all, please help me to resolve the following problem. I was trying a lot of things (see 1) and still didn't get it. There is also a project on freelancer for that (see 2): 1. http://stackoverflow.com/questions/40037684/adding-reference-to-net-assembly-which-has-dots-in-name-and-namesp