I agree with Ian. You should just be able to allow the script to end
without special closure. But you may also use sys.exit() and quit().
pygame.quit() is not usually needed, unless you intend to quit
pygame and let the program continue onto something else. What you're seeing, Bob, may be a problem with the IDE. There is consensus that IDLE is bad. It creates weird problems (with pygame only? not sure how far it goes). Annoyances like those with IDLE will likely turn your students off of Python. I don't know about WingIDE. You could try a different one. I really like PyCharm, but it is vast in features and a memory hog--possibly not ideal for beginners and school computers. For learning you might consider going with a light syntax-highlighting editor and teaching students the use of the discrete pieces that an IDE integrates for you. In other words teach fundamentals and let an IDE be an elective choice for later. When it comes to ferreting out problems in the dev environment, one needs to know what is going on behind the IDE. For me it was very useful learning nuts and bolts, and then discovering what more an IDE can do for me. Hope these tips are helpful. bw On 8/26/2015 10:55 AM, Ian Mallett
wrote:
|