Code Question: Python Interface

Asked by Davide Aversa

Hi! This is a very good project! :)

I'm going to study some parts of igraph code but I haven't understood if C code and python one are fully indipendent or python code is only a "wrapper" for C code. I think it's the first case but I want to be sure of it before to start studying.

Thanks and good work!

Question information

Language:
English Edit question
Status:
Solved
For:
igraph Edit question
Assignee:
No assignee Edit question
Solved by:
Tamás Nepusz
Solved:
Last query:
Last reply:
Revision history for this message
Best Tamás Nepusz (ntamas) said :
#1

The Python code consists of two parts. First, there is a wrapper layer that wraps the underlying C functions, this is implemented in igraph.core. If you launch a Python interpreter and import igraph.core, you will get only the wrapper layer. On top of the wrapper layer, there is a higher level module (this is what you import with "import igraph"). The higher level module will import igraph.core and override some of the functions/methods to provide a more convenient interface. The higher level module also adds support for plotting and provides nice wrapper classes for objects like vertex clustering (VertexClustering class), layouts (Layout class), vertex cuts (Cut class) and so on.

Revision history for this message
Davide Aversa (thek3nger) said :
#2

Ok! I didn't see igraph.core yet.

Thanks for the answer. :)

Revision history for this message
Davide Aversa (thek3nger) said :
#3

Thanks Tamás Nepusz, that solved my question.