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)
| 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""" |
no test coverage detected