.net4.0
mytest.py
def Add (a, b):
return a+b
I can use it in C# 4, like this:
ScriptRuntime runtime = Python.CreateRuntime();
dynamic script = runtime.UseFile("mytest.py");
Console.WriteLine(script.Add(1, 3));
But, how can I use dynamic in F#?
open System
open Microsoft.Scripting.Hosting
open IronPython.Hosting
let call a b=
let runtime = Python.CreateRuntime()
let script = runtime.UseFile("mytest.py")
script.Add(a,b)