A Picat extension for IPython and Jupyter Notebook
pip install ipicat==0.2.0
pip install jupyter pip install ipicat
--user to install in your private environment.
Inside a Jupyter Notebook with Python3 kernel, in a first cell, load the extension:
In other cell write a complete Picat program. It is important to note that the execution starts with the
%%picat main => println('Teste'), X = 1+1, println(X).
You can execute a Picat script that is in the same directory that the notebook:
%picat -e t.pi
%picat [-d DELETE] [-e EXECUTE] [-l] [-n NEW] Picat magic optional arguments: -d DELETE, --delete DELETE Delete a predicate -e EXECUTE, --execute EXECUTE Execute a Picat program -l, --list List all predicates -n NEW, --new NEW Define a new predicate from a cell. If it already exists, it will be updated.