PythonFrontend.FFIThis file is about translating Python3.8 code objects into an OCaml representation. Some interesting readings:
module Error : sig ... endmodule Constant : sig ... endmodule Code : sig ... endmodule Instruction : sig ... endval from_string :
source:string ->
filename:string ->
(Code.t, Error.t) IStdlib.IStd.resultCompiles the python program describes by source into a Code.t object
val from_file :
is_binary:bool ->
string ->
(Code.t, Error.t) IStdlib.IStd.resultGenerates a Code.t object from a file. If the file is a source file, the builtin compile from Python is called to generate the bytecode. If the file is already a bytecode file, it is used right away using the Python module Marshal