From the NamedTemporaryFile docstring:
Whether the name can be used to open the file a second time, while the named temporary file is still open, varies across platforms (it can be so used on Unix; it cannot on Windows NT or later).
So, while you still have the file open, it might not be able to be read from the subprocess. Here's what I'd do instead:
fd, tmp_fpath = tempfile.mkstemp()
os.close(fd) # Needed on Windows if you want to access the file in another process
try:
with open(tmp_fpath, "wb") as f:
f.write("\n".join(file_list) + "\n")
# ... subprocess stuff ...
do_stuff_with(tmp_fpath)
finally:
os.remove(tmp_fpath)