I'm completely new for both python and ironpython,help me to execute python scripts from c# without using ProcessStartInfo
My python Code.
import sys
from PIL import Image
img = Image.open("c:\python27\Image.png")
img.show()
My C# Code is,
var engine = Python.CreateEngine();
var searchPaths = engine.GetSearchPaths();
searchPaths.Add(@"C:\Python27\Lib");
engine.SetSearchPaths(searchPaths);
var scope = engine.CreateScope();
ScriptSource source = engine.CreateScriptSourceFromFile(@"C:\Python27\Sample.py");
source.Execute(scope);
when i run above code i'm getting Below Error.
An unhandled exception of type 'IronPython.Runtime.Exceptions.ImportException' occurred in Microsoft.Dynamic.dll
Additional information: No module named PIL.