convert linux python multiprocessing to windows -


i use linux python script in windows python.

how rewrite ? part rewritten in multiprocessing part.

from __future__ import print_function collections import counter import glob import multiprocessing import os import re import sys import time  def create_data(filepath):     ...     return values  filepaths = glob.glob('*/*.txt') num_tasks = len(filepaths)  p = multiprocessing.pool() results = p.imap(create_data, filepaths) while (true):     completed = results._index     print("\r--- completed {:,} out of {:,}".format(completed, num_tasks), end='')     sys.stdout.flush()     time.sleep(1)     if (completed == num_tasks): break p.close() p.join() df_full = pd.dataframe(list(results)) print() 

thanks help.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -