Re: [Python.NET] Problem passing parameters to a python function from C#

2006-05-12 Thread Brian Lloyd
HI Tiago - If I'm reading this right, I think the issue is that your method is returning a (Python) Template instance.The PythonNet runtime can't convert arbitrary Python types to anything that .NET can make sense of, so your method need to either return a "primitive" Python type that maps to a pr

[Python.NET] Problem passing parameters to a python function from C#

2006-05-10 Thread Tiago Matias
Hi all!I'm trying to invoke a python function from a .NET application. The C# code is this: string templateFile = "Simple.tpl"; PythonEngine.Initialize(); PyObject module = PythonEngine.ImportModule("Engine"); PyObject method = module.GetAttr("FillTemplate"); PyObject result = method.Invoke(PyO