It's an incorrect presumption that you have to close the file before other processes can access it. In fact, as you observed, when you call close on the NamedTemporaryFile it deletes the file on disk by default.
With tempfiles as with all of Python, scope and lifetime are all important. That's one of the great things about object orient languages, objects clean up after themselves when they're no longer needed (either deleted or go out of scope). Upon destruction, the tempfile objects free all resources in memory and named files on disk.
Thus, if you want to use the temporary file on disk by using the file system name, the NamedTemporaryFile should be in scope and unclosed. It's not guaranteed across all platforms, but on Unix/Linux the file should be accessible in the file system by other processes. However, the NamedTemporaryFile creates the file to readable and writeable only by the owner (unix permission 0600: -rw-------).
If you want/need to do more of this management and cleanup yourself, you might consider using the lower level function tempfile.mkstemp(). For example,
fd, tempfilename = tempfile.mkstemp()
f = os.fdopen(fd)
In either case be sure you flush the buffers before giving the filename to another process, file.flush().
So that you can use it in the with statement as a context manager and you can get the name of the file via the name property. Consider:
with tempfile.NamedTemporaryFile() as tmp_file:
subprocess.call(['foo', tmp_file.name])
do_something_with(tmp_file)
This will automatically delete the file when the body of the with statement is exited either normally or by exception.