|
From: | Scott Allen Rostrup |
Subject: | Re: [igraph] Original language of igraph and its porting to other languages |
Date: | Tue, 18 Mar 2014 16:51:59 +0000 |
You might want to look at ctypesgen
http://code.google.com/p/ctypesgen/, I found it quite good at generating a minimal representation of a C interface, I don’t think they support C++ though. You will probably want to write a more pythonic wrapper that calls down to the generated interface to avoid importing ctypes everywhere in your calling programs. Scott From: igraph-help-bounces+address@hidden [mailto:igraph-help-bounces+address@hidden
On Behalf Of Gábor Csárdi Well, there is no "correct" way to do this, I guess. Personally I would not use swig at all, because its generated interface seems bloated, at least for R. Maybe it is better for Python. It is actually high time somebody writes a new interface generator, now that libclang is available it should not be too hard, actually. Gabor On Tue, Mar 18, 2014 at 4:42 AM, Shaifali Agrawal <address@hidden> wrote: All right; Thanks a lot! So in my project I should also do the same first generate a low level interface using SWIG and than make that interface a perfect wrapper with the help of target language. Again Thank You!! On Mon, Mar 17, 2014 at 4:22 PM, Tamás Nepusz <address@hidden> wrote: Yup, Gábor is correct, the Python interface is handcrafted. Theoretically, the script we use to generate the R interface could also be used to generate the Python interface but I have never found enough spare time to replace my existing
code with the one generated by the generator so it looks like it’s here to stay.
> > mentioned on wiki page . I wanted to know how > > you people manage to port C/C++ code to other languages like Python, Ruby, > > --
-- Thanks |
[Prev in Thread] | Current Thread | [Next in Thread] |