Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pygraphml/graphml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self):
"""
"""

def write(self, graph, fname=None):
def write(self, graph, fname=None, enc=None):
"""
"""

Expand Down Expand Up @@ -73,7 +73,7 @@ def write(self, graph, fname=None):
graph_node.appendChild(edge)

if fname is not None:
f = open(fname, 'w')
f = open(fname, 'w', encoding=enc)
f.write(doc.toprettyxml(indent=' '))
else:
return doc.toprettyxml(indent='', newl='')
Expand Down