How Exit Gracefully after a Show?

See Subject. I'm looking at an example whose last line is Show(). I see nothing on the graphic that will allow me to exit. If I select the x in the upper right, it dies badly.

···

--
My life in two words. "Interrupted Projects." -- WTW (quote originator)

Hi,

If I select the x in
the upper right, it dies badly.

This is maybe another problem, after closing the windows the program should
exit with exitcode 0.

···

--------------------------

# -*- coding: utf-8 -*-
from pylab import *
t = linspace(0,10,100)
plot(t, sin(t))
show()

--------------------------

If the problem occurs with the example above it would help if you paste the
error message and the exit code.

Regards, Philipp