In order to to run the Python code using C# you need to add reference
You can get download this from http://ironpython.codeplex.com/.
You also need add Dynamic Language Runtime as reference
You can download DLR here http://dlr.codeplex.com/.
The last reference is Microsoft.Scripting, you don’t need to download for this rederence.
Open a notepad and save the following code as Test.py
print “Hello from Python”
print “Call Dir(): “
print “Print the Path: ”
Run the Python file with the following code.
staticvoid Main(string args)
var ipy = Python.CreateRuntime();
dynamic test = ipy.UseFile(“Test.py”);