def generate_gexf(G, encoding='utf-8', prettyprint=True, version='1.1draft'):
 writer = GEXFWriter(encoding=encoding, prettyprint=prettyprint, version=version)
 writer.add_graph(G)
 for line in str(writer).splitlines():
  (yield line)

def generate_gexf ( G , encoding = 'utf-8' , prettyprint = True , version = '1.1draft' ) : writer = GEXFWriter ( encoding = encoding , prettyprint = prettyprint , version = version ) writer . add_graph ( G ) for line in str ( writer ) . splitlines ( ) : ( yield line )
generate lines of gexf format representation of g .