Show More
@@ -4,7 +4,7 b'' | |||||
4 | All the matplotlib support code was co-developed with John Hunter, |
|
4 | All the matplotlib support code was co-developed with John Hunter, | |
5 | matplotlib's author. |
|
5 | matplotlib's author. | |
6 |
|
6 | |||
7 |
$Id: Shell.py 300 |
|
7 | $Id: Shell.py 3006 2008-02-01 18:00:26Z fperez $""" | |
8 |
|
8 | |||
9 | #***************************************************************************** |
|
9 | #***************************************************************************** | |
10 | # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu> |
|
10 | # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu> | |
@@ -456,15 +456,14 b' class MTInteractiveShell(InteractiveShell):' | |||||
456 | # CODE_TO_RUN is set to true/false as close as possible to the |
|
456 | # CODE_TO_RUN is set to true/false as close as possible to the | |
457 | # runcode() call, so that the KBINT handler is correctly informed. |
|
457 | # runcode() call, so that the KBINT handler is correctly informed. | |
458 | try: |
|
458 | try: | |
459 |
|
|
459 | try: | |
460 | InteractiveShell.runcode(self,code_to_run) |
|
460 | CODE_RUN = True | |
461 | if got_lock: |
|
461 | InteractiveShell.runcode(self,code_to_run) | |
462 | CODE_RUN = False |
|
462 | except KeyboardInterrupt: | |
463 |
|
|
463 | print "Keyboard interrupted in mainloop" | |
464 | print "Keyboard interrupted in mainloop" |
|
464 | while not self.code_queue.empty(): | |
465 |
|
|
465 | self.code_queue.get_nowait() | |
466 | self.code_queue.get_nowait() |
|
466 | break | |
467 | break |
|
|||
468 | finally: |
|
467 | finally: | |
469 | if got_lock: |
|
468 | if got_lock: | |
470 | CODE_RUN = False |
|
469 | CODE_RUN = False |
General Comments 0
You need to be logged in to leave comments.
Login now