yuce / pyswip

PySwip is a Python-Prolog interface that enables querying SWI-Prolog in your Python programs.
https://pyswip.org
MIT License
476 stars 98 forks source link

Incoming variable problem #78

Closed anlanxuan closed 1 week ago

anlanxuan commented 4 years ago

Hello, my purpose is to generate data through python and pass these data into Prolog for regular query, but I don't know how to pass these data into Prolog through pyswip for instantiation. Is there any method that can guide me?

marekyggdrasil commented 3 years ago

An example for creating Prolog knowledge base entries via pyswip

https://github.com/yuce/pyswip/blob/1ad3ce2d3fa4263273655f12bd9c4be07de2bd04/examples/father.py#L35-L37

I recommend closing this issue.