I just wrote a program in C# to make a ui and integrate ironpython in it to do some calculation. But when I call the function the UI Freezes till the function is over ( even the progress bar freezes )
Pardon me if the question is silly as this is my first question on StackOverFlow.com
The function is :
private void ValidateB_Click(object sender, RoutedEventArgs e)
{
string txt = proInp.Text;
var eng = Python.CreateEngine();
var searchPaths = eng.GetSearchPaths();
searchPaths.Add("F:\\Python27\\Lib");
searchPaths.Add("F:\\Python 3.6\\Lib");
eng.SetSearchPaths(searchPaths);
var scope = eng.CreateScope();
scope.SetVariable("key", txt);
eng.Execute("import os\nkey="os.getcwd()", scope);
}