python - How do I unload images in Pygame? -


i trying rename image being viewed in pygame window (same program), , since isn't idea, had rename @ end of program. however, still gives me error:

windowserror: [error 32] process cannot access file because being used process 

i tried "quitting" (un-initializing) pygame , display, still says cannot rename file error above.

is there way unload images? need do?

thanks!

try getting file object , using instead, example:

f = open('myfile.png') pygame.image.load(f) f.close() 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -