[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pygame doesn't close properly so I can't delete the file it's using



Try making a call to pygame.quit() when your program exits.


On 05/27/2017 02:05 PM, Gameskiller01 wrote:
I have a text-to-speech program in Python that I'm currently trying to get to
work on every operating system, as before it relied on Windows Media Player.
I'm trying to use Pygame to achieve this purpose, however it does not close
Pygame properly after using it the second time. When it loads the .mp3 file
for the first time it will successfully exit Pygame and allow the program to
delete the file, but if the user opts to try again and make another
text-to-speech, it will re-initialize Pygame, write the file, open and then
play the file. After the file has finished playing it will try to exit
Pygame, however Pygame does not close properly and the program is unable to
delete the .mp3 file.






--
View this message in context: http://pygame-users.25799.x6.nabble.com/Pygame-doesn-t-close-properly-so-I-can-t-delete-the-file-it-s-using-tp3044.html
Sent from the pygame-users mailing list archive at Nabble.com.