Too many open files

psaffrey at psaffrey at
Mon Feb 9 14:11:23 CET 2009

I'm building a pipeline involving a number of shell tools. In each
case, I create a temporary file using tempfile.mkstmp() and invoke a
command ("cmd < /tmp/tmpfile") on it using subprocess.Popen.

At the end of each section, I call close() on the file handles and use
os.remove() to delete them. Even so I build up file descriptors that
eventually give me the "too many files" error message. Am I missing
something here?


More information about the Python-list mailing list