Is it correct that low-level file handles are not being closed after
doing

  fd = open(filepath)
  fd.close()

If so, what is the rationale?

This seems to result in system errors when trying to (re-)move or
reopen "closed" files, as well as when opening (and closing) too many
files under Windows.

A workaround seems to be

  os_fd = os.open(filepath)
  fd = os.fdopen(os_fd)
  os.close(os_fd)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to