From c7b9d504bf423bf713a4cca13bccc861e0f82359 Mon Sep 17 00:00:00 2001 From: Norbert Litkowski Date: Mon, 10 Jun 2019 02:01:22 +0100 Subject: [PATCH] add prolog file --- Logic/TrashRecognition/TrashProlog.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Logic/TrashRecognition/TrashProlog.py diff --git a/Logic/TrashRecognition/TrashProlog.py b/Logic/TrashRecognition/TrashProlog.py new file mode 100644 index 0000000..0f45b3f --- /dev/null +++ b/Logic/TrashRecognition/TrashProlog.py @@ -0,0 +1,10 @@ +from pyswip import Prolog + +def get_trash(day: str): + prolog = Prolog() + from os import sep # os invariant separator + prolog.consult(f"Logic{sep}TrashRecognition{sep}TrashKnowledge.pl") + print(list(prolog.query("collect_trash(X)"))) + +if __name__ == "__main__": + get_trash("monday") \ No newline at end of file