fp1 = open("C:\\a.txt",'r')
fp2 = open("C:\\b.csv",'w')
fp2.write('ab''\n')
for line in fp1:
line = line.rstrip().lstrip('"').rstrip('"')
print("checking MD5 " + line)
return_code = getResult(line)
if return_code == 1:
fp2.write(line + '\n')
else:
continue
fp1.close()
fp2.close()
如何像java一样做出多进程的呢
è¯è¯è¿ä¸ªã
è¿ä¸ªæ¯å¼äºå 个è¿ç¨å¨è·å¢ï¼4个åï¼ï¼ï¼
追çæ©ï¼å°±æ¯é£ä¸¤ä¸ª4ï¼Pool(4)æ¯4个è¿ç¨ï¼pool.map(process_line, source_file, 4)ï¼æ¯æ件åäº4å
追é®å¤§å¥ï¼åç°äºä¸ä¸ªé误ï¼ä¸ºä»ä¹ä¸åçè¿ç¨è·åºæ¥çæ°æ®ä¸åå¢ï¼æ¯ä¸æ¯åªéé误äºï¼ä½ å认çççï¼æåå«ç¨4个å10个è¿ç¨è·æ°æ®ï¼å¾åºçæ°æ®ä¸ååï¼è¿ç¨è¶å¤ï¼è·åºæ¥çæ°æ®å°±è¶å°ï¼è¿æ¯ç¥é©¬æ
åµï¼è¯·å¤§ç¥å认çççï¼
æåéæ°ç¨åæ¥çç¨åºè·äºä¸éï¼è¿æ¯å¯¹ä¸ä¸ä½ çè¿ä¸ªï¼ï¼ï¼whyï¼ï¼ï¼
è¿ä¸ªç¨åºæ没æµè¯ï¼å 为没ææ°æ®ï¼è¦ä¸ä½ ç»æåä¸ä¸ªå°ç¹çæ°æ®ï¼è¿ægetResultè¿ä¸ªæ¹æ³åç»æ
追é®æ æ³åç§ä¿¡ç»ä½ å
追ç84296733 QQé®ç®±