Opened 8 years ago

Last modified 8 years ago

#12263 closed defect

Unset TERM when running sage non-interactively — at Version 2

Reported by: jdemeyer Owned by: leif
Priority: major Milestone: sage-4.8
Component: scripts Keywords:
Cc: Merged in:
Authors: Jeroen Demeyer Reviewers:
Report Upstream: Workaround found; Bug reported upstream. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by 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 12263_unset_TERM.patch to the scripts repository.

Change History (3)

comment:1 Changed 8 years ago by jdemeyer

  • Description modified (diff)
  • Report Upstream changed from N/A to Workaround found; Bug reported upstream.

Changed 8 years ago by jdemeyer

comment:2 Changed 8 years ago by jdemeyer

  • Description modified (diff)
  • Status changed from new to needs_review
Note: See TracTickets for help on using tickets.