diff options
Diffstat (limited to 'Demo/tkinter/guido')
-rwxr-xr-x | Demo/tkinter/guido/electrons.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Demo/tkinter/guido/electrons.py b/Demo/tkinter/guido/electrons.py index f3b8008..d764380 100755 --- a/Demo/tkinter/guido/electrons.py +++ b/Demo/tkinter/guido/electrons.py @@ -52,8 +52,11 @@ class Electrons: # Run -- never returns def run(self): - while 1: - self.random_move(self.n) + try: + while 1: + self.random_move(self.n) + finally: + self.tk.destroy() # Main program |