with open('output_file', 'w') as outfile:
    for calculation_result in pool.imap(compute_data, list(range(200))):
        outfile.write(calculation_result)
Write data to disk in Python as a background process