Partial copy of run_exec_lines code from IPython.core.shellapp .
(shell, exec_lines)
| 287 | |
| 288 | |
| 289 | def run_exec_lines(shell, exec_lines): |
| 290 | """ |
| 291 | Partial copy of run_exec_lines code from IPython.core.shellapp . |
| 292 | """ |
| 293 | try: |
| 294 | iter(exec_lines) |
| 295 | except TypeError: |
| 296 | pass |
| 297 | else: |
| 298 | try: |
| 299 | for line in exec_lines: |
| 300 | try: |
| 301 | shell.run_cell(line, store_history=False) |
| 302 | except: |
| 303 | shell.showtraceback() |
| 304 | except: |
| 305 | shell.showtraceback() |
| 306 | |
| 307 | |
| 308 | def embed(**kwargs): |