On 11.07.2011 12:34, Dave Hirschfeld wrote:
The other solution would be to keep my original "Python.exe" file, but if I do that I get the following error message when I try to import the CLR module:
In [1]: import clr ------------------------------------------------------------ Traceback (most recent call last): File "<ipython console>", line 1, in<module> SystemError: dynamic module not initialized properly
Is there any way around this?
Sounds like you may have forgotten to edit your buildclrmodule.bat file to reference the .NET4 version of ilasm - see:
http://permalink.gmane.org/gmane.comp.python.dotnet/970
I don't know that copying over the newly compiled python.exe will work (possibly for the reasons you state) however simply copying over the clr.pyd and Python.Runtime.dll to your C:\Python26 directory should work if you make the changes to the buildclrmodule.bat file.
Thanks a lot, Dave. After making the changes you suggested, it works to import the clr module with the original Python.exe file :-) Cheers, --- Øystein Skotheim Research Scientist, Optical Measurement Systems and Data Analysis SINTEF ICT, Trondheim, Norway