I am running python 2.6 under windows and would like to access some .net code. I have downloaded pythonnet-2.0-alpha2-136-py26.zip from source-forge.
<div>I can run the python.exe in \python2.6-UCS2 folder and from there import clr, however I want to import and run from my existing python2.6 installation. I put the clr.pyd file in sitepackages and also in DLLs but when I get the following:</div>
<div><br></div><div><div>Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on</div><div>win32</div><div>Type "help", "copyright", "credits" or "license" for more information.</div>
<div>>>> import clr</div><div>Traceback (most recent call last):</div><div> File "<stdin>", line 1, in <module></div><div>ImportError: dynamic module does not define init function (initclr)</div>
<div>>>></div></div><div><br></div><div>I also could use a bit more documentation, I went to Bryan Lloyd's blog and see:</div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, sans-serif; line-height: 22px; background-color: rgb(245, 245, 245); font-size: medium; ">Refactored import syntax: now you can use un-prefixed namespace names ( "from System import *") instead of the old "magic CLR module" syntax ("from CLR.System...). The old "CLR." syntax is still supported until 3.0, but now officially deprecated. This was the main compatibility problem with code targeted for IP.</span></div>
<div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, sans-serif; line-height: 22px; background-color: rgb(245, 245, 245); font-size: medium; "><br></span></div><div><font class="Apple-style-span" face="'trebuchet ms', verdana, sans-serif" size="3"><span class="Apple-style-span" style="line-height: 22px;">I can't figure how to get here! </span></font></div>
<div><font class="Apple-style-span" face="'trebuchet ms', verdana, sans-serif" size="3"><span class="Apple-style-span" style="line-height: 22px;"><br></span></font></div><div><font class="Apple-style-span" face="'trebuchet ms', verdana, sans-serif" size="3"><span class="Apple-style-span" style="line-height: 22px;">what is the difference between the -UCS2 and -UCS4 folders?</span></font></div>
<div><span class="Apple-style-span" style="color: rgb(85, 87, 83); font-family: georgia; font-size: 11px; line-height: 21px; background-color: rgb(255, 255, 255); "><br></span></div><div><span class="Apple-style-span" style="color: rgb(85, 87, 83); font-family: georgia; font-size: 11px; line-height: 21px; background-color: rgb(255, 255, 255); "><br>
</span></div>