Discussion:
[Python.NET] Problem invoking a method
Serge R
2008-04-01 20:22:36 UTC
Permalink
Hello everyone. This is my first time using any mailing list, I hope I did
everything right.

My issue is that I can't call InvokeMethod on an imported module because it
always claims the member does not exist. Further investigation suggests that
my module isn't being imported correctly at all, but instead I'm getting
some 'bank'.

C# end:
PyObject module = PythonEngine.ImportModule("test");
Console.WriteLine(module.Dir());
module.InvokeMethod("testFunction", new PyTuple());

test.py:
def testFunction():
print "hello"

when the Dir gets printed, I don't see any testFunction.

Loading...