ipython_log.py¶
This module modifies an ipython shell to log inputs, outputs, and
tracebacks to a custom logger.input level. The INPUT level is lower
than the DEBUG level to avoid a terminal echo in debug mode.
-
class
hutch_python.ipython_log.IPythonLogger(ipython)¶ Class that logs the most recent inputs, outputs, and exceptions at the custom
INPUTlevel.- Parameters
ipython (
ipythonShell) – The activeipythonShell, perhaps the one returned byIPython.get_ipython().
-
hutch_python.ipython_log.load_ipython_extension(ipython)¶ Initialize the
IPythonLogger.This involves adding the
INPUTlog level and registeringIPythonLogger.logto run on thepost-executeevent.- Parameters
ip (
ipythonShell) – The activeipythonShell, perhaps the one returned byIPython.get_ipython().