MCPcopy Create free account
hub / github.com/ipython/ipython / log

Method log

IPython/core/logger.py:167–185  ·  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

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

Callers 1

run_cell_asyncMethod · 0.80

Calls 1

log_writeMethod · 0.95

Tested by

no test coverage detected