import pystim_pkg::*;

module set_get_vars();
    typedef pystim py;

    initial begin
        py::initialize_interpreter();
        begin
            automatic py_dict globals = py::globals();
            automatic py_dict locals = py_dict::create_empty();
            automatic py_int res;

            locals.set(py::str_("a"), py::int_(5));

            py::exec("mult_res = a * 4", globals, locals);
            res = locals.get(py::str_("mult_res")).cast_int();

            $display("The result of multiplying a by 4 is: %0d", res.get_value());
        end
        py::finalize_interpreter();
    end
    
endmodule