I am trying to rename an image currently being viewed in a PyGame window (same program), and since that isn't really a good idea, I had it rename at the end of the program. However, it still gives me the error:
WindowsError: [Error 32] The process cannot access the file because it is being
used by another process
I tried "quitting" (un-initializing) the PyGame and the display, but it still says that it cannot rename the file with the error above.
Is there a way to unload images? Is that what I need to do?
Thanks!