matplotlib/matplotlib — Issue #686: When saving png files, they are opened but not later closed.
Author: ali-ebrahim
Created: 2012-01-25 20:27:27+00:00
State: open

In the file matplotlib/backends/backend_agg.py, for the function print_png (likely applies to print_raw as well):

If the function is passed a string instead of a file object, it will open the file, but does not seem to close it.