igraph-help
[Top][All Lists]
Advanced

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

[igraph] Python's Graph.write_x producing empty files


From: Jeff Alstott
Subject: [igraph] Python's Graph.write_x producing empty files
Date: Mon, 6 Aug 2012 17:30:28 +0100

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!

reply via email to

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