From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id HAA21555; Thu, 29 Apr 2004 07:58:40 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id HAA21538 for ; Thu, 29 Apr 2004 07:58:39 +0200 (MET DST) Received: from hotmail.com (bay9-f17.bay9.hotmail.com [64.4.47.17]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i3T5wbjq004037 for ; Thu, 29 Apr 2004 07:58:38 +0200 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 28 Apr 2004 22:58:36 -0700 Received: from 192.174.21.220 by by9fd.bay9.hotmail.msn.com with HTTP; Thu, 29 Apr 2004 05:58:36 GMT X-Originating-IP: [192.174.21.220] X-Originating-Email: [max_powers280@hotmail.com] X-Sender: max_powers280@hotmail.com From: "Max Powers" To: skaller@users.sourceforge.net Cc: caml-list@inria.fr Subject: Re: [Caml-list] Calling Ocaml from Python Date: Thu, 29 Apr 2004 15:28:36 +0930 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 29 Apr 2004 05:58:36.0833 (UTC) FILETIME=[03226910:01C42DAF] X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 python:01 2004:99 2004:99 swig:01 swig:01 python:01 ahhh:99 50,000:99 ocaml:01 ocaml:01 280:98 interfaces:01 click:97 parser:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 2004-04-29 at 15:33, skaller wrote: >On Thu, 2004-04-29 at 15:07, Max Powers wrote: > > >On Thu, 2004-04-29 at 13:49, skaller wrote: > > > I.e. I can use SWIG to > > generate an interface to a c library so I can use that from Ocaml, >rather > > than generating an interface to expose Ocaml functions to a C (or other) > > program. > >You can write a C wrapper for an Ocaml function in C, >and then wrap THAT using SWIG so you can call it from Python. Ahhh, right, I've got you now. Thanks for the clarification. So as I see it I've got the following options: 1) write the parser in ocaml. Wrap ocaml in C then wrap that using SWIG into a python module. 2) write the parser in C. Use SWIG to generate Ocaml and python modules. 3) write the parser in python. Use Pycaml to call the python module from Ocaml. The determining factor seems to be down to my preference for implementation language; I should be able to call functions and convert return types across each of these interfaces fairly easily. Is that a fair summary? Ta, -Max _________________________________________________________________ SEEK: Now with over 50,000 dream jobs! Click here: http://ninemsn.seek.com.au?hotmail ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners