@open_file(0, mode='rb')
def read_pajek(path, encoding='UTF-8'):
 lines = (line.decode(encoding) for line in path)
 return parse_pajek(lines)

@ open_file ( 0 , mode = 'rb' ) def read_pajek ( path , encoding = 'UTF-8' ) : lines = ( line . decode ( encoding ) for line in path ) return parse_pajek ( lines )
read graph in pajek format from path .