In [1]: from igraph import Graph

In [2]: g = Graph(1)

In [5]: g.add_vertices(2)

In [7]: g.add_edges([(0,1), (1,2)])

In [8]: print(g)
IGRAPH U--- 3 2 --
+ edges:
0--1 1--2

In [9]: g.write_pajek('test')

In [11]: g.write_graphml('test')

In [12]: g.write('test.net')

In [13]: g.write('test.net', format='net')

In [14]: g.write('test.net', format='pickle')

In [15]: g.save('test.net')

In [16]: f = open('test.net', 'w')

In [17]: g.write_pajek(f)


All of these produce empty files, instead of something with information on
the graph g. What am I doing wrong?

Thanks!
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to