MCPcopy Index your code
hub / github.com/bpython/bpython / clear_modules_and_reevaluate

Method clear_modules_and_reevaluate

bpython/curtsiesfrontend/repl.py:1139–1149  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1137 self.status_bar.message(_("Session edited and reevaluated"))
1138
1139 def clear_modules_and_reevaluate(self):
1140 if self.watcher:
1141 self.watcher.reset()
1142 cursor, line = self.cursor_offset, self.current_line
1143 for modname in set(sys.modules.keys()) - self.original_modules:
1144 del sys.modules[modname]
1145 self.reevaluate(new_code=False)
1146 self.cursor_offset, self.current_line = cursor, line
1147 self.status_bar.message(
1148 _("Reloaded at %s by user.") % (time.strftime("%X"),)
1149 )
1150
1151 def toggle_file_watch(self):
1152 if self.watcher:

Callers 4

process_control_eventMethod · 0.95
process_key_eventMethod · 0.95

Calls 4

reevaluateMethod · 0.95
_Function · 0.90
resetMethod · 0.45
messageMethod · 0.45

Tested by 2