Show More
@@ -164,15 +164,15 b' class HistoryManager(Configurable):' | |||
|
164 | 164 | def reset(self, new_session=True): |
|
165 | 165 | """Clear the session history, releasing all object references, and |
|
166 | 166 | optionally open a new session.""" |
|
167 | if self.session_number: | |
|
168 | self.end_session() | |
|
169 | self.input_hist_parsed[:] = [""] | |
|
170 | self.input_hist_raw[:] = [""] | |
|
171 | 167 | self.output_hist.clear() |
|
172 | 168 | # The directory history can't be completely empty |
|
173 | 169 | self.dir_hist[:] = [os.getcwd()] |
|
174 | 170 | |
|
175 | 171 | if new_session: |
|
172 | if self.session_number: | |
|
173 | self.end_session() | |
|
174 | self.input_hist_parsed[:] = [""] | |
|
175 | self.input_hist_raw[:] = [""] | |
|
176 | 176 | self.new_session() |
|
177 | 177 | |
|
178 | 178 | ## ------------------------------- |
@@ -1045,13 +1045,13 b' class InteractiveShell(Configurable, Magic):' | |||
|
1045 | 1045 | """ |
|
1046 | 1046 | # Clear histories |
|
1047 | 1047 | self.history_manager.reset(new_session) |
|
1048 | # Reset counter used to index all histories | |
|
1049 | if new_session: | |
|
1050 | self.execution_count = 1 | |
|
1048 | 1051 | |
|
1049 | 1052 | # Flush cached output items |
|
1050 | 1053 | self.displayhook.flush() |
|
1051 | 1054 | |
|
1052 | # Reset counter used to index all histories | |
|
1053 | self.execution_count = 0 | |
|
1054 | ||
|
1055 | 1055 | # Restore the user namespaces to minimal usability |
|
1056 | 1056 | for ns in self.ns_refs_table: |
|
1057 | 1057 | ns.clear() |
General Comments 0
You need to be logged in to leave comments.
Login now