我必须从c#调用textfsm python模块函数。 我正在为此使用Ironpython。
当前代码
ScriptEngine engine = Python.CreateEngine();
var paths = engine.GetSearchPaths();
string dir2 = @"C:\Program Files\Python37\Lib\site-packages";
paths.Add(dir2); // change this path according to your IronPython installation
engine.SetSearchPaths(paths);
var scope = engine.CreateScope();
var eng = engine.ExecuteFile(@"C:\Program Files\Python37\Lib\site-package\textfsm.py", scope);
此后,我不知道如何执行textfsm代码。如何传递模板并获得输出。