diff options
Diffstat (limited to 'Demo/tkinter/guido/electrons.py')
-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 d764380..f16c3fa 100755 --- a/Demo/tkinter/guido/electrons.py +++ b/Demo/tkinter/guido/electrons.py @@ -55,8 +55,11 @@ class Electrons: try: while 1: self.random_move(self.n) - finally: - self.tk.destroy() + except TclError: + try: + self.tk.destroy() + except TclError: + pass # Main program |