Posts

Showing posts from January, 2009

Papers 24/1/2009

Pretty interesting paper

Cloud Computing and Grid Computing 360-Degree Comparedhttp://xxx.lanl.gov/abs/0901.0131

Using Custom DLL with IronPython / Scripts

Using Custom DLL with IronPython

This example here assumed that you have class written in VB/C# with the following namespace Liverpool.Soccer.

It has a static class called Torrest.Hello();

First set the lookup path for Pyton

1.import sys

2.sys.path.append("c:\\love\\Liverpool.soccer\\Liverpool.Soccer\\bin\\Debug")

3.import clr

4.clr.AddReferenceToFile("Liverpool.Soccer.dll");

5.import Liverpool.Soccer

Finally invoke your method by calling :-

6.Liverpool.Soccer.Torrest.Hello();

That's it.


Alternatively .... you can save this into a file call clib.py.

import sys
sys.path.append("c:\\love\\Liverpool.soccer\\Liverpool.Soccer\\bin\\Debug")
import clr
clr.AddReferenceToFile("Liverpool.Soccer.dll");
import Liverpool.Soccer
Liverpool.Soccer.Torrest.Hello();

Then execute it using ipy clib.py

VS 2008 Create Project Tool version unrecognized

If you have error creating project and receive Unable read project file [full filename]: The tools version "3.5" is unrecognised, then the following should help to solve it.

Open up your Window registry :-

And make the following changes....

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\3.5]
"DefaultToolsVersion"="2.0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\2.0]
"MSBuildToolsPath"="C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\3.5]
"MSBuildToolsPath"="C:\\WINDOWS\\Microsoft.NET\\Framework\\v3.5\\"