Dear Gotfried and Kish, sorry for not seeing this earlier. There is another Python interface to ECLiPSe (and other deductive engines) I've implemented some time ago, and is part of SPADE: http://code.google.com/p/spade2/ It's not a real interface, since it uses pexpect to interact with the ECLiPSe console. Here you can find it: http://code.google.com/p/spade2/source/browse/trunk/spade/pyxf.py Hope this helps. All the best, M. On Wed, Nov 21, 2012 at 3:03 PM, Gottfried F. Zojer <goenzoy_at_...6...> wrote: > Hello Kish, > > Thanks for your long answer and in essence it answered my questions. > I was well aware that PyCLP and any interface between ECLiPSe and a database > ( in my case PostgreSQL and MongoDB ) > are two different things.I will follow your advise and look into the > lib(dbi) library.to see if there is any chance to modify the MySQL interface > in a way that it works with PostgreSQL or MongoDB. > Personally I mostly use Python and also i discovered ECLiPSe and Constraint > Programming through the PySwip module and one book > from Krzysztof Apt.And now I m in the process to do a assessment of ECLiPSe > and Constraint Programming compared to SWI Prolog > and Prolog ISO standard > > Best regards > > Gottfried > > > On Wed, Nov 14, 2012 at 3:01 AM, Kish Shen <kisshen_at_...5...> wrote: >> >> Hi Gottfried, >> >> I am not sure I understand what you are doing exactly, and there are >> several different issues I am not clear about: >> >> 1. What exactly do you mean by "the Python Interface"? Do you mean PyCLP, >> Oreste Berbardi's Python interface to ECLiPSe? This is an interface >> developed independently by Oreste, and I don't know much about it, so I >> can't really help you here. >> >> 2. If you are talking about PyCLP, I don't really understand how this >> relates to providing an interface to PostgreSQL for ECLiPSe. As I understand >> it, PyCLP allows you to call ECLiPSe code (goals) from Python, and I assume >> also for ECLiPSe code to call Phython code. I don't see what this has to do >> with PostgreSQL. >> >> I took a quick look at the PostgreSQL documentation, and there is >> PL/Python, a server programming interface that allows user functions in >> PostgreSQL to be programmed in Python. However, I don't see how this helps >> you to interface ECLiPSe to PostgreSQL. >> >> 3. In addition, this interface is for server programming -- extending >> PostgreSQL's SQL. This is not what lib(dbi) -- ECLiPSe's interface to MySQL >> you mentioned -- does. What lib(dbi) does is to use MySQL as a database from >> ECLiPSe, i.e. to send data and SQL query/commands to MySQL, and receive data >> back from MySQL. This is done using the client interface of MySQL. >> PostgreSQL has the equivalent client interface, and like MySQL's, the API is >> for C, and from my very quick look, the API is similar to MySQL's. >> >> So I think that if you want to interface to PostgreSQL (for ECLiPSe) in a >> way similar to what lib(dbi) does with MySQL -- you probably want to start >> with the existing lib(dbi) code and try to adapt the C part of the code to >> use PostgreSQL's API instead of MySQL's. Note that lib(dbi) itself was >> adapted in a similar way from an interface to (a very old version of) >> Oracle. I did this adaption, and I tried to write the C code in such a way >> that adapting the code for another SQL-based database should be relatively >> easy (assuming the API provides similar functionality as MySQL's), but >> unfortunately I don't think there is much implementation documentation for >> this library -- there is oci.txt, which is some brief notes for the old >> Oracle interface, and was what I used when I adapted the code for MySQL. >> >> Cheers, >> >> Kish >> >> >> On 12/11/2012 17:17, Gottfried F. Zojer wrote: >>> >>> Hello to everyone, >>> >>> I can see within the source-code download that eclipseclp can be linked >>> to >>> Mysql. >>> Just wondering if somebody is using eclipseclp with PostgreSQL via the >>> Python Interface? >>> Unfortunately I m getting error messages when installing the Python >>> Interface ( cython distutils import ) >>> >>> Thanks in advance for any feedback >>> >>> Best regards >>> >>> Gottfried >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Everyone hates slow websites. So do we. >>> Make your web apps faster with AppDynamics >>> Download AppDynamics Lite for free today: >>> http://p.sf.net/sfu/appdyn_d2d_nov >>> >>> >>> >>> _______________________________________________ >>> ECLiPSe-CLP-Users mailing list >>> ECLiPSe-CLP-Users_at_lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users >>> >> > > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > _______________________________________________ > ECLiPSe-CLP-Users mailing list > ECLiPSe-CLP-Users_at_lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users > -- Markus Schatten, PhD Assistant professor University of Zagreb Faculty of Organization and Informatics Pavlinska 2, 42000 Varazdin, Croatia http://www.foi.hr/nastavnici/schatten.markus/index.html http://www.researchgate.net/profile/Markus_Schatten1Received on Wed Nov 21 2012 - 16:24:20 CET
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST