using Python; static Python.Object? emb_numargs (Python.Object? self, Python.Object? args) { var s = ""; if (!Python.arg_parse_tuple (args, "s", &s)) { return null; } stdout.printf ("Says: %s", s); return Python.build_value (""); } const MethodDef[] emb_methods = { { "puts", emb_numargs, MethodFlags.VARARGS, "Prints Hello World!." }, { null, null, 0, null } }; int main (string[] args) { Python.initialize (); Python.init_module ("emb", emb_methods); Python.run_simple_string (""" import emb emb.puts('Hello World!\n') """); Python.finalize (); return 0; }