[IronPython] Calling Methods from other Methods
kenj55
ken.jackson at vamosa.com
Tue Dec 19 18:38:38 CET 2006
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.
More information about the Ironpython-users
mailing list