Depending on what you're doing you might be better off using Func<object> 
instead of CallTarget0.  CallTarget0 is more of a Python implementation detail 
and could change w/ major IronPython versions - or even be replaced w/ 
Func<object>.  it's primary purpose is to be the delegate for calling a 
zero-arg Python function so it could change due to changes in how we implement 
functions.  Func<object> will always exist and do exactly what it says.  Of 
course if you are actually doing something w/ calling classes or functions then 
it's the right thing to use.

From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Antonio Piteira
Sent: Sunday, February 22, 2009 10:26 AM
To: users@lists.ironpython.com
Subject: [IronPython] Fwd: Ironpython delegates...

Found the solution...

clr.AddReference("Ironpython")
from IronPython.Compiler import CallTarget0

I was looking in the wrong place.

--------------------------------------------------------------------------------------------------------------------------


I've been searching for CallTarget0 and from what I read it should be in 
Microsoft.Scripting.dll, but when I add the reference to clr and import 
CallTarget0  from Microsoft.Scripting.dll I get this message:

---------------------------
Error...
---------------------------
Cannot import name CallTarget0
---------------------------
OK
---------------------------

Any ideas?

Thank you.

_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to