The ipython_shell.py module#

Summary#

ShellHooks

IPython shell lifetime hooks.

cleanup

Cleanup the ipython shell.

in_ipython

Return whether Python is running from IPython.

post_ipython_blocks

Initiate the IPython worker thread for block execution.

get_shell_hooks

Get the shell hooks object.

Description#

Module for scheduling background work in IPython shells.

Interactive Python, or IPython, offers an enhanced Python shell. This module schedules all the work of the IPython shell on a background thread, allowing the Main thread to be used exclusively for the shell frontend. As a result, user-defined functions can be executed during idle time between blocks.

Module detail#

ipython_shell.cleanup()#

Cleanup the ipython shell.

Must be called before the application exits. May be called from an atexit handler.

ipython_shell.in_ipython()#

Return whether Python is running from IPython.

ipython_shell.post_ipython_blocks()#

Initiate the IPython worker thread for block execution.

ipython_shell.get_shell_hooks()#

Get the shell hooks object.

ipython_shell.FROM_IPYTHON#
ipython_shell.CODE_QUEUE#
ipython_shell.RESULT_QUEUE#
ipython_shell.SHUTDOWN_EVENT#
ipython_shell.EXEC_THREAD = None#
ipython_shell.ORIGINAL_RUN_CELL = None#
ipython_shell.EXECUTION_THREAD_ID: int = None#
ipython_shell.DEFAULT_IDLE_HOOK#
ipython_shell.SHELL_HOOKS#