Source

opycaml / xapi.mli

(** Useful functions which might be moved to api.ml *)

open Type

val ( % ) : [> _Dict ] t -> string -> _Object t
(** getItemString *)

val ( %! ) : [> _Object ] t -> string -> _Object t
(** Dict.coerce + getItemString *)

val ( !:> ) : [> _Object ] t -> _Object t
(** Forget Python object class *)

val call_obj : [> _Object ] t -> ?kwd:[> _Dict ] t -> [> _Object ] t list -> _Object t
(** Dynamically typed function call *)

val call_obj_ : [> _Object ] t -> ?kwd:[> _Dict ] t -> [> _Object ] t list -> unit
(** Dynamically typed function call *)

val dict_of_alist : ([> _Object ] t * [> _Object ] t) list -> _Dict t
(** Building a Dict from an assoc list via API: Very slow *)

val dict_of_klist : (string * [> _Object ] t) list -> _Dict t
(** Building a Dict from a "keyword list" via API. Very slow. *) 

val import_module : string -> _Dict t
(** Import a module. Ex. [import_module "pylab"] *)