On Wed, Aug 26, 2015 at 11:38 AM, Bob Irving <bob...@gmail.com> wrote:

> Is there a way to exit your game gracefully when there are errors? We have
> found with both IDLE and WingIDE that the game hangs, requiring several
> clicks of the X, etc.
>
> We are ending our game loop with
>
> pygame.quit()
> sys.exit()
>
​I prefer to let the script terminate itself (i.e. fall out the bottom),
but sys.exit should work fine too. I remember having this issue with older
versions of Python, but 2.7 or 3.* should work fine.

Here's some skeleton code
<http://geometrian.com/programming/tutorials/PyGame%20Program%20Shell.py.txt>
that I use.

Ian

Reply via email to