[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Starting from IDLE
- To: pygame-users@seul.org
- Subject: Re: [pygame] Starting from IDLE
- From: flbl@go.wifl.at.org
- Date: Sat, 10 Jan 2004 16:04:15 -0800
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Sat, 10 Jan 2004 18:33:28 -0500
- In-reply-to: <Pine.LNX.4.44.0310151444290.31796-100000@verso.st.jyu.fi>
- References: <3F8D32C5.6080804@softwave.se> <Pine.LNX.4.44.0310151444290.31796-100000@verso.st.jyu.fi>
- Reply-to: pygame-users@seul.org
- Sender: owner-pygame-users@seul.org
- User-agent: Mutt/1.5.4i
On Wed, Oct 15, 2003 at 02:45:52PM +0300, Sami Hangaslammi wrote:
>
> On Wed, 15 Oct 2003, Bo Jangeborg wrote:
> > When I run a pygame program from IDLE (windows IDE) the game window
> > doesn't close when the application stops. I have to press CTRL-ALT-DEL
> > to close the window. Am I missing something ?
>
> Don't run from IDLE. That's the only solution I can offer. IDLE uses Tk
> and its event loop messes with pygame events.
>
> Do the editing in IDLE and run your program from the command line.
>
> --
> Sami Hangaslammi
>
How about trying this:
try:
my_stuff_that_uses_pygame()
finally:
pygame.quit()
That way pygame.quit gets called even when your code crashes.