您好,我正在使用以下python脚本生成组合列表,但生成20分钟或大约2gb后,我收到“ OSError:[Errno 5]输入/输出错误”
我的代码:
with open(selectedreplacelist, 'r', encoding="ISO-8859-1") as replacemes:
for replaceme in replacemes:
replaceme = replaceme.rstrip('\n')
if ('(kw)' in replaceme) or ('(KW)' in replaceme):
with open(selectedkeywordlist, 'r', encoding="ISO-8859-1") as keywords:
for keyword in keywords:
keyword = keyword.rstrip('\n')
kwps.write(re.sub(r'(?i)\(kw\)', keyword, replaceme + "\n"))
else:
kwps.write(replaceme + "\n")
其他信息: 运行ubuntu 18,其他人在Windows上尝试过,效果很好 kwps = txt文件,它将生成的组合保存到我的新三星t5 ssd上