Did you know ... | Search Documentation: |
Janus class Term |
Class janus.Term() encapsulates a Prolog term. Similarly to the Python object reference (see py_is_object/1), the class allows Python to represent arbitrary Prolog data, typically with the intend to pass it back to Prolog.
prolog(Term)
to the data
conversion process. As a result, we can do
?- py_call(janus:echo(prolog(hello(world))), Obj, [py_object(true)]). Obj = <py_Term>(0x7f7a14512050). ?- py_call(print($Obj)). hello(world) Obj = <py_Term>(0x7f7a14512050).