mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
[3.13] gh-127060: Disable traceback colors in IDLE (GH-128028) (#128052)
Set TERM environment variable to "dumb" to disable traceback colors
in IDLE, since IDLE doesn't understand ANSI escape sequences.
(cherry picked from commit 559b0e7013
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
fe08cdf265
commit
f8b4e20137
2 changed files with 5 additions and 1 deletions
|
@ -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), (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue