diff options
author | Victor Stinner <vstinner@python.org> | 2024-12-18 05:35:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-18 05:35:05 (GMT) |
commit | 559b0e7013f9cbf42a12fe9c86048d5cbb2f6f22 (patch) | |
tree | 7e42cf5aac47abe806215de69ae86b68dfca705c /Lib/idlelib | |
parent | b92f101d0f19a1df32050b8502cfcce777b079b2 (diff) | |
download | cpython-559b0e7013f9cbf42a12fe9c86048d5cbb2f6f22.zip cpython-559b0e7013f9cbf42a12fe9c86048d5cbb2f6f22.tar.gz cpython-559b0e7013f9cbf42a12fe9c86048d5cbb2f6f22.tar.bz2 |
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.
Diffstat (limited to 'Lib/idlelib')
-rwxr-xr-x | Lib/idlelib/pyshell.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py index e882c6c..66fbbd4 100755 --- a/Lib/idlelib/pyshell.py +++ b/Lib/idlelib/pyshell.py @@ -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), ( |