Thanks Ken!

Looks like a bug to me and I've filed a CodePlex Work Item (see 
http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=6714).

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of kenj55
Sent: Tuesday, December 19, 2006 9:39 AM
To: [email protected]
Subject: [IronPython] Calling Methods from other Methods


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
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to