我这里有一些代码在python2.7上使用Networkx,但是我想我正在使用的包含文件的文件夹太大了,所以我的程序被杀死了
如何修复此问题,使其可以接受文件夹中的大量文件?我想这是操作系统的限制
def countSubgraphs(graph_dir):
graph_files = []
dirFiles = listdir(graph_dir)
dirFiles.sort()
sorted(dirFiles)
for files in dirFiles:
graph_files.append(files)
#It is breaking below
the_graphs = [nx.read_edgelist(join(graph_dir, f), create_using=nx.DiGraph()) for f in graph_files]
谢谢
目前没有回答
相关问题 更多 >
编程相关推荐