Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] Calling Ocaml from Python
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-04-29 (05:58)
From: Max Powers <max_powers280@h...>
Subject: Re: [Caml-list] Calling Ocaml from Python
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, 
> > 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 

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?


SEEK: Now with over 50,000 dream jobs! Click here:

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: