MCPcopy Index your code
hub / github.com/ipython/ipython / log

Method log

IPython/core/logger.py:171–189  ·  view source on GitHub ↗

Write the sources to a log. Inputs: - line_mod: possibly modified input, such as the transformations made by input prefilters or input handlers of various kinds. This should always be valid Python. - line_ori: unmodified input line from the user. This i

(self, line_mod, line_ori)

Source from the content-addressed store, hash-verified

169 print('State :', state)
170
171 def log(self, line_mod, line_ori):
172 """Write the sources to a log.
173
174 Inputs:
175
176 - line_mod: possibly modified input, such as the transformations made
177 by input prefilters or input handlers of various kinds. This should
178 always be valid Python.
179
180 - line_ori: unmodified input line from the user. This is not
181 necessarily valid Python.
182 """
183
184 # Write the log line, but decide which one according to the
185 # log_raw_input flag, set when the log is started.
186 if self.log_raw_input:
187 self.log_write(line_ori)
188 else:
189 self.log_write(line_mod)
190
191 def log_write(self, data, kind='input'):
192 """Write data to the log file, if active"""

Callers 1

run_cell_asyncMethod · 0.45

Calls 1

log_writeMethod · 0.95

Tested by

no test coverage detected