(self)
| 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: |
no test coverage detected