const std = @import("std"); const Io = std.Io; const zpy = @import("zpy"); pub fn main() !void { var py: zpy.Interpreter = try .init(); defer py.deinit(); _ = try py.run("def hello(a, b): return a + b", .{ }); var test_fn = py.globals.get(.{ .string = "hello" }) orelse unreachable; defer test_fn.decref(); var result = try test_fn.call(try .pack(&.{ zpy.Str.fromString("hello").object, zpy.Str.fromString("world").object, }), null); defer result.decref(); std.debug.print("globals = {f}\n", .{py.globals.object}); std.debug.print("hello() = {f}\n", .{result}); }