Module Py__Py_base
OCaml interface to Python
v1.3 — homepage
Py
val pyobject : pyobject Ctypes.typ
exceptionInvalid_typeexceptionInvalid_objectexceptionPython_error of stringexceptionEnd_iteration
module C : sig ... endC makes the underlying Python C libraries available
module Object : sig ... endObject defines functions for working with generic Python objects
module PyNumber : sig ... endmodule PyIter : sig ... endmodule PyDict : sig ... endmodule PyList : sig ... endmodule PySet : sig ... endmodule PyTuple : sig ... endmodule PySlice : sig ... endval get_module_dict : unit -> Object.t
module PyModule : sig ... endmodule PyCell : sig ... endmodule PyWeakref : sig ... endmodule PyThreadState : sig ... endval new_interpreter : unit -> PyThreadState.tval end_interpreter : PyThreadState.t -> unit
module PyBytes : sig ... endmodule PyUnicode : sig ... endmodule PyBuffer : sig ... endmodule PyByteArray : sig ... endtype t=|Ptr of Object.t|Cell of Object.t|Nil|Bool of bool|Int of int|Int64 of int64|Float of float|String of string|Bytes of Stdlib.Bytes.t|List of t list|Tuple of t array|Dict of (t * t) list|Set of t list|Slice of t * t * t
val to_object : t -> Object.tval initialize : ?initsigs:bool -> unit -> unitval finalize : unit -> unitval exec : string -> boolExecute a string for side-effects only
val locals : unit -> Object.t optionval globals : unit -> Object.t optionval builtins : unit -> Object.tval eval : ?globals:t -> ?locals:t -> string -> Object.tEvaluate a string and return the response
val run : Object.t -> ?kwargs:(t * t) list -> t list -> Object.tval (!$) : t -> Object.tval ($) : Object.t -> t list -> Object.tval ($.) : Object.t -> t -> Object.tval (<-$.) : (Object.t * t) -> t -> unitval ($|) : Object.t -> t -> Object.tval (<-$|) : (Object.t * t) -> t -> unitval append_path : string list -> unitval prepend_path : string list -> unitval pickle : ?kwargs:(t * t) list -> Object.t -> bytesval unpickle : ?kwargs:(t * t) list -> bytes -> Object.tval print : ?kwargs:(t * t) list -> t list -> unitval c_function : (Object.t -> Object.t -> Object.t) -> Object.t -> name:string -> Object.tc_function fn obj ~namereturns a Python function. When this function is called on some argumentsargs,fn obj argsis called.
module Numpy : sig ... endmodule CamlModule : sig ... end