Adnan Umer added the comment: I tried to replace RESTART by doing these little changing
# PyShell.Py class ModifiedInterpreter(InteractiveInterpreter): def restart_subprocess(self, with_cwd=False, with_msg=True): ... if with_msg: halfbar = ((int(console.width) - 16) // 2) * '=' console.write(halfbar + ' RESTART ' + halfbar) def runcode(self, code): with_msg = True if code.co_filename[0] != '<': self.tkconsole.write('Executing ' + code.co_filename + '\n') with_msg = False if self.tkconsole.executing: self.interp.restart_subprocess(with_msg) # ScriptBinding.Py class ScriptBinding: def _run_module_event(self, event): filename = self.getfilename() if not filename: return 'break' code = self.checksyntax(filename) if not code: return 'break' if not self.tabnanny(filename): return 'break' interp = self.shell.interp if PyShell.use_subprocess: interp.restart_subprocess(with_cwd=False, with_msg=False) This works fine and replaces RESTART with Execute <filename> when file is executed in Python Shell. Also instead of this halfbar = ((int(console.width) - 16) // 2) * '=' console.write(halfbar + ' RESTART ' + halfbar) my recomemdation is: console.write('[SHELL RESTART]') ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21192> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com