Discussion:
[Python.NET] Python.Net with Boa under Linux
Serge Gauthier
2008-05-30 12:22:19 UTC
Permalink
I currently use Python 2.5, Boa constructor 0.6.1 under Windows and Linux Mandrake. On a motion control CPU card, running Linux on Power PC, there is a Mono, C# dll server. To communicate with under Windows XP, I had to recompile the Python-Runtime project with VS C#. It works now fine under Boa: I can import clr and do the following:
lib = clr.AddReference("PPmacClassLibrary")
from PPmacClassLibrary import PPmacDeviceClass
self.pmac = PPmacDeviceClass(HOST, "PythonPmac", port)

Under Linux, it is not possible to do the same, I tryed to use clr.so and Python-Runtime.dll and the error message is : "impossible to load the assembly".
Could you tell me how to solve that ? I am not familar with C# and Mono. Do I have to recompile under Mono and how to do ? I don't understand well how it works on Linux.
Thanks a lot for your help

Serge
--
J'utilise la version gratuíte de SPAMfighter pour utilisateurs privés.
Ce programme a supprimé1619 d'e-mails spam à ce jour.
Les utilisateurs qui paient n'ont pas ce message dans leurse-mails.
Obtenez la version gratuite de SPAMfighter ici: http://www.spamfighter.com/lfr
Joe Frayne
2008-05-30 17:25:45 UTC
Permalink
Hi Serge,



I got it working with Python2.5 and Mono 1.9 on MacOSX 10.5.2, but I think it is broken again under Mono 1.9.1. I checked in all my changes, but no new package has been created, so you have to rebuild everything yourself (which it sounds like you are doing).



Here's what I did for MacOSX:



1. Build a UCS-2 version of Python.Runtime.dll on Windows.

2. Build the clr.so on MacOSX (see README.txt for specifics).

3. Copy the clr.so, the Python.Runtime.dll, and the \trunk\pythonnet\doc\Python.Runtime.dll.config to the site-packages folder.

4. Copy all your other .NET .dlls to the site-packages folder.



I'm not sure if you need to do anything differently for Linux.



Joe



From: pythondotnet-bounces-+ZN9ApsXKcEdnm+***@public.gmane.org [mailto:pythondotnet-bounces-+ZN9ApsXKcEdnm+***@public.gmane.org] On Behalf Of Serge Gauthier
Sent: Friday, May 30, 2008 5:22 AM
To: pythondotnet-+ZN9ApsXKcEdnm+***@public.gmane.org
Subject: [Python.NET] Python.Net with Boa under Linux



I currently use Python 2.5, Boa constructor 0.6.1 under Windows and Linux Mandrake. On a motion control CPU card, running Linux on Power PC, there is a Mono, C# dll server. To communicate with under Windows XP, I had to recompile the Python-Runtime project with VS C#. It works now fine under Boa: I can import clr and do the following:
lib = clr.AddReference("PPmacClassLibrary")
from PPmacClassLibrary import PPmacDeviceClass
self.pmac = PPmacDeviceClass(HOST, "PythonPmac", port)

Under Linux, it is not possible to do the same, I tryed to use clr.so and Python-Runtime.dll and the error message is : "impossible to load the assembly".
Could you tell me how to solve that ? I am not familar with C# and Mono. Do I have to recompile under Mono and how to do ? I don't understand well how it works on Linux.
Thanks a lot for your help

Serge



________________________________

J'utilise la version gratuite de SPAMfighter pour utilisateurs privés.
1619 e-mails spam ont été bloqués jusqu'à maintenant.
Les utilisateurs payant n'ont pas ce message dans leurs e-mails.
Essayez SPAMfighter <http://www.spamfighter.com/lfr> gratuitement maintenant!
Loading...