I'm trying to translate the following C# example, which constructs an IronPython module, to F#.
using System;
using IronPython.Runtime;
[assembly: PythonModule("my_module", typeof(MyModule))]
public static class MyModule {
public static void hello_world() {
Console.WriteLine("hello world");
}
}
Using PythonModule allows from my_module import *
, among other things.
I am having trouble figuring out how to apply the PythonModule attribute in F#. The F# documentation only talks about assembly attributes related to modules, and attached to do(). It's not clear to me how to define static classes that are interpreted as python modules, but I am not a C#/F#/IronPython expert.