Show More
@@ -118,12 +118,11 b' def flush_figures():' | |||||
118 | return show(True) |
|
118 | return show(True) | |
119 | except Exception as e: |
|
119 | except Exception as e: | |
120 | # safely show traceback if in IPython, else raise |
|
120 | # safely show traceback if in IPython, else raise | |
121 |
|
|
121 | ip = get_ipython() | |
122 |
|
|
122 | if ip is None: | |
123 | except NameError: |
|
|||
124 | raise e |
|
123 | raise e | |
125 | else: |
|
124 | else: | |
126 |
|
|
125 | ip.showtraceback() | |
127 | return |
|
126 | return | |
128 | try: |
|
127 | try: | |
129 | # exclude any figures that were closed: |
|
128 | # exclude any figures that were closed: | |
@@ -133,13 +132,12 b' def flush_figures():' | |||||
133 | display(fig) |
|
132 | display(fig) | |
134 | except Exception as e: |
|
133 | except Exception as e: | |
135 | # safely show traceback if in IPython, else raise |
|
134 | # safely show traceback if in IPython, else raise | |
136 |
|
|
135 | ip = get_ipython() | |
137 |
|
|
136 | if ip is None: | |
138 | except NameError: |
|
|||
139 | raise e |
|
137 | raise e | |
140 | else: |
|
138 | else: | |
141 |
|
|
139 | ip.showtraceback() | |
142 |
|
|
140 | return | |
143 | finally: |
|
141 | finally: | |
144 | # clear flags for next round |
|
142 | # clear flags for next round | |
145 | show._to_draw = [] |
|
143 | show._to_draw = [] |
General Comments 0
You need to be logged in to leave comments.
Login now