• Advertisement
Sign in to follow this  

After program ends, the Pygame window won't go away

This topic is 4480 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was reading a tutorial linked from pygame.org, and it said that you don't need to perform any clean-up for pygame. Well, when my pygame program quits (and I check that it does), the window won't close. I don't have the source with me, but I will in an hour or so. It might have to do with how I am calling main(); I make it a normal function, though I have seen another way that uses an 'if' statement. Any ideas (I realize I didn't post the source)? [Edited by - Daniel Miller on October 10, 2005 4:53:24 PM]

Share this post


Link to post
Share on other sites
Advertisement
That'll happen if you are, for example, running the app from within something like an IDE or from within an executing interpreter process. As long as the process that executes the app remains, the window will not close unless you explicitly call pygame.quit().

Share this post


Link to post
Share on other sites
Quote:
Original post by VertexNormal
That'll happen if you are, for example, running the app from within something like an IDE or from within an executing interpreter process. As long as the process that executes the app remains, the window will not close unless you explicitly call pygame.quit().


Thanks, that solved it.

As a side question, could you recommend a better IDE than the "standard" one (from python.org)? It doesn't do on-the-fly code highlighting, and it doesn't have auto-completion (which may not be possible in Python).

[Edited by - Daniel Miller on October 11, 2005 7:16:21 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Daniel Miller
As a side question, could you recommend a better IDE than the "standard" one (from python.org)? It doesn't do on-the-fly code highlighting, and it doesn't have auto-completion (which may not be possible in Python).


I write the code in SPE, but use IDLE for interactive evaluation (because SPE is a bit buggy in that respect - you'll see when you try it). IDLE does support autocompletion partially... that is, it'll let you autocomplete with things it has already seen, not necessarily *known* member of the type (which, as you pointed out, isn't easy to figure out in Python without running the code).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement