Skip to content

Unset TERM when running sage non-interactively #12263

@jdemeyer

Description

@jdemeyer

Because of either a readline or a Python bug, sometimes control characters are output by Python. For example, on my Gentoo Linux system:

jdemeyer@arcanis:~$ sage --python -c 'import readline' |cat -t
^[[?1034hjdemeyer@arcanis:~$

This breaks doctests at #12249 for sage-run. The easiest solution is to unset the TERM environment variable when running sage-run or sage-eval. This will effectively disable readline.

Upstream (readline): http://lists.gnu.org/archive/html/bug-readline/2007-08/msg00004.html

Apply attachment: 12263_unset_TERM.patch to the scripts repository.

Upstream: Workaround found; Bug reported upstream.

Component: scripts

Author: Jeroen Demeyer

Reviewer: Volker Braun

Merged: sage-4.8.rc0

Issue created by migration from https://trac.sagemath.org/ticket/12263

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions