Graphs in Python
George Sakkis
george.sakkis at gmail.com
Fri Apr 11 14:31:37 EDT 2008
On Apr 10, 1:05 pm, Sanhita Mallick <sanhi... at yahoo.com> wrote:
> Hi.
>
> I am a newbie to Python. I am trying to implement a
> Python code for graph manipulation. My graphs are
> about 200-500 nodes big. Excepting for the short basic
> graph implementation info on Python.org, where can I
> find more in depth info about how to express graphs in
> python, and how to use them in a code?
>
> Also, does anyone know of a easy way of creating the
> dictionary for python for a 500-node graph, without
> typing each and every node? I found some application
> that recognize dot file Graphviz - but I am looking
> for a program that can let me "draw" a graph and then
> generate the lists automatically from the drawing.
>
> Thanks.
> -SM
A pure python package such as those mentioned in other replies is most
likely fine for graphs of several hundreds nodes, but in case
performance matters, you can take a look at the Python bindings of the
Boost graph library [1].
George
[1] http://www.osl.iu.edu/~dgregor/bgl-python/
More information about the Python-list
mailing list