MCPcopy
hub / github.com/prompt-toolkit/ptpython / run_exec_lines

Function run_exec_lines

src/ptpython/ipython.py:289–305  ·  view source on GitHub ↗

Partial copy of run_exec_lines code from IPython.core.shellapp .

(shell, exec_lines)

Source from the content-addressed store, hash-verified

287
288
289def 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
308def embed(**kwargs):

Callers 1

embedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected