There is an extensive documentation on the hosting APIs that comes with the 
distribution (Doc\IronPythonApiReference.chm)

As for the example that didn't work for you ... you had 2 Python engines and 
the "testing" module was created in one of them whereas "import testing" was 
executed in different engine (the one controlled by the Python console).

Martin

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gary Stephenson
Sent: Monday, September 18, 2006 4:05 AM
To: Discussion of IronPython
Subject: Re: [IronPython] How to dynamically define and call a function?

d'oh!  I knew there must have been a straightforward way.

I'm still curious as to how to use the IronPython.Hosting stuff though, as I
thinkultimately it might prove to be more what I'm really after.

thanks,

gary



> This works for me:
>
> IronPython 1.0.2449 on .NET 2.0.50727.42
> Copyright (c) Microsoft Corporation. All rights reserved.
>>>> code = "def add(x, y):\n\treturn x + y\n"
>>>> exec code
>>>> add(2, 3)
> 5

_______________________________________________
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