First time using IronPython trying to run a lib called emsndis, but I get "Invalid" syntax" while imporing the lib. It is located in the root folder of my project but I also have copy local set to true so it is also located in my bin-folder of my .exe-file.
If it try importing the lib in a "real" python file running from a stand-alone .py-file in the command prompt, it works just fine, so I believe this is something fishy with the config of IronPython.
ScriptEngine engine = Python.CreateEngine();
ICollection<string> paths = engine.GetSearchPaths();
paths.Add(@"C:\Python27\Lib\");
paths.Add(@"C:\Users\bjorn\Documents\emsn-dis\env\Lib\site-packages");
paths.Add(@"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Lib\");
engine.SetSearchPaths(paths);
py("import math");
py("import time");
py("import signal");
py("import sys");
py("from datetime import datetime");
py("from collections import namedtuple");
py("from bitstring import Bits");
py("from emsndis import EmsnDis");
py("print 5");
engine.Execute(sb.ToString());
I have never worked with Python, nor IronPython so perhaps you need more info, just let me know.