Building a gephi file with graph-tool