I have the following function:
def copy_file(source_file, target_dir): pass
Now I would like to use multiprocessing to exe
multiprocessing
For Python2.7+ or Python3, you could use functools.partial:
import functools copier = functools.partial(copy_file, target_dir=target_dir) p.map(copier, file_list)