[Python.NET] python 2.5

Maksim Kozyarchuk mkozyarchuk at funddevelopmentservices.com
Tue Oct 9 04:50:02 CEST 2007


 

I've had a similar experience.  Out of the box binaries don't work
unless included python.exe is used.  A simple recompile of the code
using VS C# express solved this.

 

Also, attached is a slightly modified version of clrmodule.il that
allows you to load clr.pyd and Python.Runtime.dll from any directory( as
long as it's in pythonpath) 

 


Maksim

 

________________________________

From: pythondotnet-bounces at python.org
[mailto:pythondotnet-bounces at python.org] On Behalf Of Feihong Hsu
Sent: Monday, October 08, 2007 12:43 PM
To: Paul Harter; pythondotnet at python.org
Cc: tim at red56.co.uk
Subject: Re: [Python.NET] python 2.5

 

Hi, I ran into exactly the same problem as you but I did manage to solve
it by recompiling the entire project in visual c# express.
Unfortunately, I don't recall exactly what I did and I don't have my
laptop handy right now, but I can find out later. 

In the meantime, you can try the recompile, and, to modify an existing
installation, copy the .pyd file to C:\Python25\DLLs\ and the .dll file
to C:\Python25\. Then it should "just work".

Cheers,

Feihong

Paul Harter <paul at lumidium.com> wrote:

Hi,

We are tring to move to python 2.5. and are having trouble getting
pythonDotNet to import using the pre-built binaries. When we use the
python.exe which is part of the pre-built binaries "import clr" can
execute without a problem. However trying to use an existing
python.exe (e.g. the standard installed one, but we also need to use
it embedded) we always get the following error:

ImportError: dynamic module does not define init function (initclr)

What magic does the included python.exe perform, or what are we doing
wrong in our installation.

We have tried:

* copying Python.runtime.dll and clr.pyd to the python install path
(where python.exe lives), or both to the DLLs directory, or clr.pyd to
the site-packages directory and Python.runtime.dll to one of the above
locations.
* We've also tried having them in a separate directory, and running
python.exe from that directory.

(The readme is not very explanatory on how to modify an existing
python installation).

thanks for your help

Paul & Tim
_________________________________________________
Python.NET mailing list - PythonDotNet at python.org
http://mail.python.org/mailman/listinfo/pythondotnet

 

  

________________________________

Take the Internet to Go: Yahoo!Go puts the Internet in your pocket:
<http://us.rd.yahoo.com/evt=48253/*http:/mobile.yahoo.com/go?refer=1GNXI
C>  mail, news, photos & more. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythondotnet/attachments/20071008/0dd9a680/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clrmodule.il
Type: application/octet-stream
Size: 5544 bytes
Desc: clrmodule.il
Url : http://mail.python.org/pipermail/pythondotnet/attachments/20071008/0dd9a680/attachment.obj 


More information about the PythonDotNet mailing list