@open_file(1, mode='wb')
def write_pajek(G, path, encoding='UTF-8'):
    for line in generate_pajek(G):
        line += '\n'
        path.write(line.encode(encoding))
Write graph in Pajek format to path.
dataset/ETHPy150Open networkx/networkx/networkx/readwrite/pajek.py/write_pajek