Hi,

I'm having a problem calling one method from another when i run python
within the PythonEngine.

i.e. If I have the following code:

string functions = "def func1():\n\treturn \"hello\"\n\n";
functions += "def func2():\n\treturn func1()\n\n";
functions += "func2()";

pyEngine.Execute(functions, module, locals);

I get an error along the lines of:

IronPython.Runtime.Exceptions.PythonNameErrorException: name 'func1' not
defined



Does anyone have any ideas where I might be going wrong?

Cheers,
Ken 
-- 
View this message in context: 
http://www.nabble.com/Calling-Methods-from-other-Methods-tf2847245.html#a7951284
Sent from the IronPython mailing list archive at Nabble.com.

_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to