Temp files in Python.

Recently, I hit a nasty bug while working with temp files in Python.

The issue was manifesting itself in Windows.  Interestingly I wasnt hitting it on Linux.

  • As it so turns out I would have eventually hit it on Linux too.

 

The issue was because of a leaked file descriptor.  The following link explains the issue