wikiextractor
wikiextractor copied to clipboard
Open output files after forking
Fixes #233 Opening output files before forking makes the script crash on Windows . I did not test the influence of this PR on other systems and python versions.
Watch out: the second argument to reduce_process() might be sys.stdout and not an OutputSplitter.
if out_file == '-':
output = sys.stdout
Then it won't have method open_file(), that you call in reduce+process().
fixed