Kevin McKelvin
Software developer, blogger, speaker, CTO
Presentation: Dynamic Languages & DLR Presentation - Languages UG
14 July 2011
Thanks for the great turn-out at the Microsoft Community Night on 12 July, we had a full room for the languages UG!
For those who weren’t there - I gave a talk on Dynamic Languages and the DLR on Tuesday 12 July.
Here are the resources from the talk:
- IronPython: http://ironpython.codeplex.com
- Clay: http://clay.codeplex.com
- System.Dynamic: http://msdn.microsoft.com/en-us/library/system.dynamic.aspx
And here’s the code used to call a Python script from C#, using the DLR interop and dynamic keyword:
var engine = IronPython.Hosting.Python.CreateEngine();
var scope = engine.Runtime.UseFile("greeter.py");
dynamic greeterClass = scope.GetVariable("Greeter");
dynamic greeter = greeterClass();
dynamic s = greeter.sayHello("Kevin!");
Console.WriteLine(s);
Console.Read();