Module Python_lib__.Py_module
val create : Base.string -> tcreate module_namecreates a new python module with the specified name. This module can directly be imported from python.
val create_with_eval : name:Base.string -> py_source:Base.string -> tcreate_with_eval ~name ~py_sourcecreates a new module defined by evaluatingpy_sourcewhich contains some python code.
val set_value : t -> Base.string -> Python_lib__.Import.pyobject -> Base.unitset_value t name objsets the fieldnameon moduletto hold valueobj. This can be accessed viat.namein python.
val pyobject : t -> Python_lib__.Import.pyobjectpyobject treturns the underlying python object for a module.
val set_function : t -> ?docstring:Base.string -> Base.string -> (Python_lib__.Import.pyobject Base.array -> Python_lib__.Import.pyobject) -> Base.unitset_function t ?docstring name fnadds to moduleta function namednamewhich evaluates as thefnclosure. This only handles positional arguments.
val set_function_with_keywords : t -> ?docstring:Base.string -> Base.string -> (Python_lib__.Import.pyobject Base.array -> (Base.string, Python_lib__.Import.pyobject, Base.String.comparator_witness) Base.Map.t -> Python_lib__.Import.pyobject) -> Base.unitset_function_with_keywords t ?docstring name fnadds to moduleta function namednamewhich evaluates as thefnclosure. This handles both positional and keyword arguments.
val set : t -> ?docstring:Base.string -> Base.string -> Python_lib__.Import.pyobject Python_lib.Defunc.t -> Base.unitset t ?docstring name fnsets a function on moduletnamedname. This function is defined by defuncfn.
val set_unit : t -> ?docstring:Base.string -> Base.string -> Base.unit Python_lib.Defunc.t -> Base.unitset_unitis a specialized version ofsetfor function that returnunit.
val set_no_arg : t -> ?docstring:Base.string -> Base.string -> (Base.unit -> Python_lib__.Import.pyobject) -> Base.unitset_no_arg t ?docstring name fnsets a function on moduletnamedname. This function does not take any positional or keyword argument.
val keywords_of_python : Python_lib__.Import.pyobject -> (Base.string, Python_lib__.Import.pyobject, Base.String.comparator_witness) Base.Map.t Base.Or_error.tHelper function to get keywords from a python object. When no keyword is present, null is used; otherwise a python dictionary with string key gets used.
val wrap_ocaml_errors : (Base.unit -> 'a) -> 'a
module Raw : sig ... end