igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Original language of igraph and its porting to other langua


From: Tamás Nepusz
Subject: Re: [igraph] Original language of igraph and its porting to other languages
Date: Mon, 17 Mar 2014 11:52:09 +0100

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.

For what it’s worth, the interfaces that SWIG and alike generate from C code 
are usually kind of brittle, so my experience is that it is usually easier to 
generate a “low-level” interface with SWIG and then wrap it with a high level 
interface that fits more into the host language. To some extent, this is also 
what I do with the Python interface: the handcrafted C code compiles into a 
hidden module named igraph._igraph, and the “main” igraph module imports almost 
all the stuff from igraph._igraph and then wraps some functions that are too 
cumbersome to use with their original (C-like) interface.

--  
T.

------------------------------------------------------
From: Gábor Csárdi address@hidden
Reply: Help for igraph users address@hidden
Date: 17 March 2014 at 01:28:11
To: Help for igraph users address@hidden
Subject:  Re: [igraph] Original language of igraph and its porting to other 
languages

> Hi, we don't use SWIG. Much of the R interface is generated by a Python
> script we wrote. The Python interface is totally hand-written, AFAIK.
>  
> See the sources at https://github.com/igraph/igraph, the develop tree is
> most recent.
>  
> Best,
> Gabor
>  
>  
> On Sun, Mar 16, 2014 at 5:09 PM, Shaifali Agrawal <
> address@hidden> wrote:
>  
> > Hello igraph developers
> >
> > Oriignal language in which igraph is written are C/C++(right?) as
> > mentioned on wiki page . I wanted to know how
> > you people manage to port C/C++ code to other languages like Python, Ruby,
> > R. Have you used SWIG which work for many other
> > languages or diffrint lib/tool for different languages like for Python we
> > have Boost.Python, PypiRobin ,
> > tradtional C++ embedding http://docs.python.org/2/extending/extending.html, 
> >  
> > etc.I want to know process of binding for each language and specifically
> > for Python. I need this for one of my project in which want to do same.
> >
> >
> > --
> > Thanks
> >
> >
> > _______________________________________________
> > igraph-help mailing list
> > address@hidden
> > https://lists.nongnu.org/mailman/listinfo/igraph-help
> >
> >
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]