diff options
| author | Terry Jan Reedy <tjreedy@udel.edu> | 2015-08-01 02:35:00 (GMT) | 
|---|---|---|
| committer | Terry Jan Reedy <tjreedy@udel.edu> | 2015-08-01 02:35:00 (GMT) | 
| commit | 26f667676f6ea44c8d3e5a41f345acfaeca30bc2 (patch) | |
| tree | 2ec05d7162371f070838d5c05a8c42084e18b468 /Lib/idlelib/PyShell.py | |
| parent | a0a28b076a537c11b63a9fd79b05d27ea9cb5bde (diff) | |
| parent | 231007fe142975ee5e468929af5ed69705e7547e (diff) | |
| download | cpython-26f667676f6ea44c8d3e5a41f345acfaeca30bc2.zip cpython-26f667676f6ea44c8d3e5a41f345acfaeca30bc2.tar.gz cpython-26f667676f6ea44c8d3e5a41f345acfaeca30bc2.tar.bz2 | |
Merge with 3.4
Diffstat (limited to 'Lib/idlelib/PyShell.py')
| -rwxr-xr-x | Lib/idlelib/PyShell.py | 13 | 
1 files changed, 6 insertions, 7 deletions
| diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 12233fb..4f7a6de 100755 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -469,7 +469,7 @@ class ModifiedInterpreter(InteractiveInterpreter):          self.poll_subprocess()          return self.rpcclt -    def restart_subprocess(self, with_cwd=False): +    def restart_subprocess(self, with_cwd=False, filename=''):          if self.restarting:              return self.rpcclt          self.restarting = True @@ -497,14 +497,13 @@ class ModifiedInterpreter(InteractiveInterpreter):          console.stop_readline()          # annotate restart in shell window and mark it          console.text.delete("iomark", "end-1c") -        if was_executing: -            console.write('\n') -            console.showprompt() -        halfbar = ((int(console.width) - 16) // 2) * '=' -        console.write(halfbar + ' RESTART ' + halfbar) +        tag = 'RUN ' + filename if filename else 'RESTART Shell' +        halfbar = ((int(console.width) -len(tag) - 4) // 2) * '=' +        console.write("\n{0} {1} {0}".format(halfbar, tag))          console.text.mark_set("restart", "end-1c")          console.text.mark_gravity("restart", "left") -        console.showprompt() +        if not filename: +            console.showprompt()          # restart subprocess debugger          if debug:              # Restarted debugger connects to current instance of debug GUI | 
