Python crashing on Mac
Question: I just download a graphics module (found at
<http://mcsp.wartburg.edu/zelle/python/>) and wrote a quick program to test it
out. All it is supposed to do is create a window. It works, but the second the
window is created Python (not IDLE) goes non-responsive and I have to force
quit. What could be causing this? The code (that they provide as an example)
is:

    
    
    from graphics import *
    
    def main():
        win = GraphWin("My Circle", 100, 100)
        c = Circle(Point(50,50), 10)
        c.draw(win)
        win.getMouse()
        win.close()
    

After I click it suddenly crashes.


Answer: This is actually expected behavior. The line

    
    
    win.getMouse()
    

hangs the interpreter and window until you click. After the click, the line

    
    
    win.close()
    

destroys the window, then your program terminates. This may appear as a
"crash" to you, but is actually the expected end of your Python program's run.
(If you're getting an error, post the trace in your question.)

