<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Comic Sans MS";
        panose-1:3 15 7 2 3 3 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Comic Sans MS";
        color:teal;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=teal face="Comic Sans MS"><span
style='font-size:10.0pt;font-family:"Comic Sans MS";color:teal'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=2 color=teal
face="Comic Sans MS"><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:teal'>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.<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=2 color=teal
face="Comic Sans MS"><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:teal'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=2 color=teal
face="Comic Sans MS"><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:teal'>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) <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=teal face="Comic Sans MS"><span
style='font-size:10.0pt;font-family:"Comic Sans MS";color:teal'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=teal face="Comic Sans MS"><span
style='font-size:10.0pt;font-family:"Comic Sans MS";color:teal'>Maksim<o:p></o:p></span></font></p>
<p class=MsoNormal align=center style='text-align:center'><font size=2
color=teal face="Comic Sans MS"><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:teal'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
pythondotnet-bounces@python.org [mailto:pythondotnet-bounces@python.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Feihong Hsu<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, October 08, 2007
12:43 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Paul Harter;
pythondotnet@python.org<br>
<b><span style='font-weight:bold'>Cc:</span></b> tim@red56.co.uk<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Python.NET] python
2.5</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>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. <br>
<br>
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".<br>
<br>
Cheers,<br>
<br>
Feihong<br>
<br>
<b><i><span style='font-weight:bold;font-style:italic'>Paul Harter
<paul@lumidium.com></span></i></b> wrote:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hi,<br>
<br>
We are tring to move to python 2.5. and are having trouble getting<br>
pythonDotNet to import using the pre-built binaries. When we use the<br>
python.exe which is part of the pre-built binaries "import clr" can<br>
execute without a problem. However trying to use an existing<br>
python.exe (e.g. the standard installed one, but we also need to use<br>
it embedded) we always get the following error:<br>
<br>
ImportError: dynamic module does not define init function (initclr)<br>
<br>
What magic does the included python.exe perform, or what are we doing<br>
wrong in our installation.<br>
<br>
We have tried:<br>
<br>
* copying Python.runtime.dll and clr.pyd to the python install path<br>
(where python.exe lives), or both to the DLLs directory, or clr.pyd to<br>
the site-packages directory and Python.runtime.dll to one of the above<br>
locations.<br>
* We've also tried having them in a separate directory, and running<br>
python.exe from that directory.<br>
<br>
(The readme is not very explanatory on how to modify an existing<br>
python installation).<br>
<br>
thanks for your help<br>
<br>
Paul & Tim<br>
_________________________________________________<br>
Python.NET mailing list - PythonDotNet@python.org<br>
http://mail.python.org/mailman/listinfo/pythondotnet<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=1 width="100%" align=center>
</span></font></div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Take the Internet to Go: Yahoo!Go puts the <a
href="http://us.rd.yahoo.com/evt=48253/*http:/mobile.yahoo.com/go?refer=1GNXIC">Internet
in your pocket:</a> mail, news, photos & more. <o:p></o:p></span></font></p>
</div>
</body>
</html>