I have created temporary named files, with the tempfile libraries NamedTemporaryFile method. I have written to them flushed the buffers, and I have not closed them (or else they might go away)
I am trying to use the subprocess module to call some shell commands using these generated files.
subprocess.call('cat %s' % f.name) always fails saying that the named temporary file does not exist.
os.path.exists(f.name) always returns true. I can run the cat command on the file directly from the shell.
Is there some reason the subprocess module will not work with temporary files?
Is there any way to make it work?
Thanks in advance.