Discussion:
[Python.NET] using external assembly with pythonnet
a***@public.gmane.org
2014-06-16 08:07:14 UTC
Permalink
Hello,

I'm a beginner in pythonnet, and I try to use an external assembly with pythonnet.

I use python 2.7.7, and a pythonnet version installed with pip install --pre pythonnet. I have also installed the framework 4

I try to load for instance the tamir dll (net version 1.1).
Assembly and source available here : http://www.tamirgal.com/blog/page/SharpSSH.aspx

source code :

import sys
sys.path.append("E:\Alex\dotnet\SharpSSH")
import clr
clr.AddReference("Tamir.SharpSsh" )

I obtain the following error :

E:\Alex\python>testdotnet.py
Traceback (most recent call last):
File "E:\Alex\python\testdotnet.py", line 10, in <module>
clr.AddReference("Tamir.SharpSsh")
System.IO.FileNotFoundException

What is wrong in my use of pythonnet ? I have checked that there is a namespace Tamir.SharpSsh in dll source files. It is also possible to load this assembly with Ctypes : windll.LoadLibrary("E:\Alex\dotnet\SharpSSH\Tamir.SharpSsh.dll")

Many thanks for your help.

Alexandre
a***@public.gmane.org
2014-06-19 07:59:11 UTC
Permalink
Additional information : I have done this test on Windows Xp 32. I will soon be able to try on Windows 7 64 bits. Do you know where I can find exemples of call if external assembly with pythonnet ?

Thanks for your help,

Alexandre


----- Mail original -----

De: "alexandre pineau p" <alexandre.pineau.p-***@public.gmane.org>
À: pythondotnet-+ZN9ApsXKcEdnm+***@public.gmane.org
Envoyé: Lundi 16 Juin 2014 10:07:14
Objet: [Python.NET] using external assembly with pythonnet


Hello,

I'm a beginner in pythonnet, and I try to use an external assembly with pythonnet.

I use python 2.7.7, and a pythonnet version installed with pip install --pre pythonnet. I have also installed the framework 4

I try to load for instance the tamir dll (net version 1.1).
Assembly and source available here : http://www.tamirgal.com/blog/page/SharpSSH.aspx

source code :

import sys
sys.path.append("E:\Alex\dotnet\SharpSSH")
import clr
clr.AddReference("Tamir.SharpSsh")

I obtain the following error :

E:\Alex\python>testdotnet.py
Traceback (most recent call last):
File "E:\Alex\python\testdotnet.py", line 10, in <module>
clr.AddReference("Tamir.SharpSsh")
System.IO.FileNotFoundException

What is wrong in my use of pythonnet ? I have checked that there is a namespace Tamir.SharpSsh in dll source files. It is also possible to load this assembly with Ctypes : windll.LoadLibrary("E:\Alex\dotnet\SharpSSH\Tamir.SharpSsh.dll")

Many thanks for your help.

Alexandre

_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
https://mail.python.org/mailman/listinfo/pythondotnet

Loading...