mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Merge with 3.4
This commit is contained in:
commit
26f667676f
3 changed files with 8 additions and 8 deletions
|
@ -469,7 +469,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
|
||||||
self.poll_subprocess()
|
self.poll_subprocess()
|
||||||
return self.rpcclt
|
return self.rpcclt
|
||||||
|
|
||||||
def restart_subprocess(self, with_cwd=False):
|
def restart_subprocess(self, with_cwd=False, filename=''):
|
||||||
if self.restarting:
|
if self.restarting:
|
||||||
return self.rpcclt
|
return self.rpcclt
|
||||||
self.restarting = True
|
self.restarting = True
|
||||||
|
@ -497,13 +497,12 @@ class ModifiedInterpreter(InteractiveInterpreter):
|
||||||
console.stop_readline()
|
console.stop_readline()
|
||||||
# annotate restart in shell window and mark it
|
# annotate restart in shell window and mark it
|
||||||
console.text.delete("iomark", "end-1c")
|
console.text.delete("iomark", "end-1c")
|
||||||
if was_executing:
|
tag = 'RUN ' + filename if filename else 'RESTART Shell'
|
||||||
console.write('\n')
|
halfbar = ((int(console.width) -len(tag) - 4) // 2) * '='
|
||||||
console.showprompt()
|
console.write("\n{0} {1} {0}".format(halfbar, tag))
|
||||||
halfbar = ((int(console.width) - 16) // 2) * '='
|
|
||||||
console.write(halfbar + ' RESTART ' + halfbar)
|
|
||||||
console.text.mark_set("restart", "end-1c")
|
console.text.mark_set("restart", "end-1c")
|
||||||
console.text.mark_gravity("restart", "left")
|
console.text.mark_gravity("restart", "left")
|
||||||
|
if not filename:
|
||||||
console.showprompt()
|
console.showprompt()
|
||||||
# restart subprocess debugger
|
# restart subprocess debugger
|
||||||
if debug:
|
if debug:
|
||||||
|
|
|
@ -142,7 +142,7 @@ class ScriptBinding:
|
||||||
return 'break'
|
return 'break'
|
||||||
interp = self.shell.interp
|
interp = self.shell.interp
|
||||||
if PyShell.use_subprocess:
|
if PyShell.use_subprocess:
|
||||||
interp.restart_subprocess(with_cwd=False)
|
interp.restart_subprocess(with_cwd=False, filename=code.co_filename)
|
||||||
dirname = os.path.dirname(filename)
|
dirname = os.path.dirname(filename)
|
||||||
# XXX Too often this discards arguments the user just set...
|
# XXX Too often this discards arguments the user just set...
|
||||||
interp.runcommand("""if 1:
|
interp.runcommand("""if 1:
|
||||||
|
|
|
@ -1442,6 +1442,7 @@ Fraser Tweedale
|
||||||
Doobee R. Tzeck
|
Doobee R. Tzeck
|
||||||
Eren Türkay
|
Eren Türkay
|
||||||
Lionel Ulmer
|
Lionel Ulmer
|
||||||
|
Adnan Umer
|
||||||
Roger Upole
|
Roger Upole
|
||||||
Daniel Urban
|
Daniel Urban
|
||||||
Michael Urman
|
Michael Urman
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue