Hello All,
I am new to python and may be I am not able to follow python basic rules. Let me explain you guys my problem and I hope i get solution of it.
I have create VS2015 ironpython solution and it works fine. I have used ironpython wpf in this.
Now i want use this ironCalc.py file with some other normal wpf C# application. I wrote code like this:
private static void externalPyt()
{
var engine = Python.CreateEngine();
var paths = engine.GetSearchPaths();
paths.Add(@"c:\Program Files (x86)\IronPython 2.7\Platforms\Net40");
engine.SetSearchPaths(paths);
var ipy = Python.CreateRuntime();
dynamic py = ipy.UseFile(@"C:\Users\praj\Documents\Visual Studio 2015\Projects\IronCalc\IronCalc\IronCalc.py");
py.start_element();
}
private void button_Click(object sender, RoutedEventArgs e)
{
externalPyt();
}
while executing this code i get exception at "dynamic py = ipy.UseFile(@"C:\Users\praj\Documents\Visual Studio 2015\Projects\IronCalc\IronCalc\IronCalc.py");"
exception says no module named wpf found. however i have already used "using IronPython.Modules". I have also added reference of ironpython.wpf , ironpython.module in c# project but still this exception doesn't go away.

Can anyone help and point out what is wrong in this code.
thanks
I am new to python and may be I am not able to follow python basic rules. Let me explain you guys my problem and I hope i get solution of it.
I have create VS2015 ironpython solution and it works fine. I have used ironpython wpf in this.
Now i want use this ironCalc.py file with some other normal wpf C# application. I wrote code like this:
private static void externalPyt()
{
var engine = Python.CreateEngine();
var paths = engine.GetSearchPaths();
paths.Add(@"c:\Program Files (x86)\IronPython 2.7\Platforms\Net40");
engine.SetSearchPaths(paths);
var ipy = Python.CreateRuntime();
dynamic py = ipy.UseFile(@"C:\Users\praj\Documents\Visual Studio 2015\Projects\IronCalc\IronCalc\IronCalc.py");
py.start_element();
}
private void button_Click(object sender, RoutedEventArgs e)
{
externalPyt();
}
while executing this code i get exception at "dynamic py = ipy.UseFile(@"C:\Users\praj\Documents\Visual Studio 2015\Projects\IronCalc\IronCalc\IronCalc.py");"
exception says no module named wpf found. however i have already used "using IronPython.Modules". I have also added reference of ironpython.wpf , ironpython.module in c# project but still this exception doesn't go away.



Can anyone help and point out what is wrong in this code.
thanks