gh-127060: Disable traceback colors in IDLE (#128028)
Set TERM environment variable to "dumb" to disable traceback colors in IDLE, since IDLE doesn't understand ANSI escape sequences.
This commit is contained in:
parent
b92f101d0f
commit
559b0e7013
@ -424,7 +424,9 @@ class ModifiedInterpreter(InteractiveInterpreter):
|
||||
def spawn_subprocess(self):
|
||||
if self.subprocess_arglist is None:
|
||||
self.subprocess_arglist = self.build_subprocess_arglist()
|
||||
self.rpcsubproc = subprocess.Popen(self.subprocess_arglist)
|
||||
# gh-127060: Disable traceback colors
|
||||
env = dict(os.environ, TERM='dumb')
|
||||
self.rpcsubproc = subprocess.Popen(self.subprocess_arglist, env=env)
|
||||
|
||||
def build_subprocess_arglist(self):
|
||||
assert (self.port!=0), (
|
||||
|
@ -0,0 +1,2 @@
|
||||
Set TERM environment variable to "dumb" to disable traceback colors in IDLE,
|
||||
since IDLE doesn't understand ANSI escape sequences. Patch by Victor Stinner.
|
Loading…
x
Reference in New Issue
Block a user