MCPcopy Index your code
hub / github.com/python/cpython / runit

Method runit

Lib/idlelib/pyshell.py:1352–1362  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1350
1351 _last_newline_re = re.compile(r"[ \t]*(\n[ \t]*)?\z")
1352 def runit(self):
1353 index_before = self.text.index("end-2c")
1354 line = self.text.get("iomark", "end-1c")
1355 # Strip off last newline and surrounding whitespace.
1356 # (To allow you to hit return twice to end a statement.)
1357 line = self._last_newline_re.sub("", line)
1358 input_is_complete = self.interp.runsource(line)
1359 if not input_is_complete:
1360 if self.text.get(index_before) == '\n':
1361 self.text.tag_remove(self.user_input_insert_tags, index_before)
1362 self.shell_sidebar.update_sidebar()
1363
1364 def open_stack_viewer(self, event=None): # -n mode only
1365 if self.interp.rpcclt:

Callers 1

enter_callbackMethod · 0.95

Calls 6

update_sidebarMethod · 0.80
indexMethod · 0.45
getMethod · 0.45
subMethod · 0.45
runsourceMethod · 0.45
tag_removeMethod · 0.45

Tested by

no test coverage detected