Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Interface for Python values of type Run
.
eval ~start ~globals ~locals e
evaluates the Python expression e
and returns the computed value. We have Py.Run.eval ~start ~globals ~locals e = Py.Run.string e start globals locals
.
val load :
?start:input ->
?globals:Object.t ->
?locals:Object.t ->
in_channel file ->
string ->
Object.t
load ~start ~globals ~locals chan filename
loads the contents of the file opened in chan
. We have Py.Run.load ~start ~globals ~locals chan filename = Py.Run.file chan filename start globals locals
.
Runs the interactive loop. We have Py.Run.interactive () = Py.Run.interactive_loop stdin "<stdin>"
.
val any_file : in_channel file -> string -> unit
Wrapper for PyRun_AnyFile
Wrapper for PyRun_File
val interactive_one : in_channel -> string -> unit
Channels suppose that the same C runtime has been used to compile both the Python library and the OCaml runtime. Warning: using channels is unsafe if runtimes differ (can lead to segmentation fault). Wrapper for PyRun_InteractiveOne
val interactive_loop : in_channel -> string -> unit
Channels suppose that the same C runtime has been used to compile both the Python library and the OCaml runtime. Warning: using channels is unsafe if runtimes differ (can lead to segmentation fault). Wrapper for PyRun_InteractiveLoop
val simple_file : in_channel file -> string -> unit
Wrapper for PyRun_SimpleFile
Wrapper for PyRun_SimpleString
Wrapper for PyRun_String