Skip to content

Instantly share code, notes, and snippets.

@spin6lock
Created August 13, 2018 09:16
Show Gist options
  • Save spin6lock/bdb433314e89c7dfc6433161fea20d1d to your computer and use it in GitHub Desktop.
Save spin6lock/bdb433314e89c7dfc6433161fea20d1d to your computer and use it in GitHub Desktop.
xls2lua_pool_vs_xls2lua
diff xls2lua_pool.py xls2lua.py !10017
20,21d19
< from multiprocessing import Pool
< from functools import partial
773,774d770
< def wrap_conv_xls(args, file_names_):
< convet_xls_file(args[0], args[1], file_names_=file_names_)
809,811d804
< p = Pool(8)
<
< all_filenames = []
816,818c809
< all_filenames.append(path)
<
< p.map(partial(convet_xls_file, output=OUTPUT, file_names_=file_names_), all_filenames)
---
> convet_xls_file(path, OUTPUT, file_names_)
821,822d811
< new_all_filenames = []
< new_file_names_ = {}
836c825
< new_all_filenames.append((sub_path, output))
---
> convet_xls_file(sub_path, output, file_names_)
838,839d826
<
< p.map(partial(wrap_conv_xls, file_names_=new_file_names_), new_all_filenames)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment