Still better is this, in
~/.sage/ipython-0.12/profile_sage/ipython_config.py:
o = get_config()
try:
import curses
curses.initscr()
except:
print "can't initscr with curses"
pass
else:
try:
if not curses.has_colors():
o.SageInteractiveShell.colors = "NoCol
Better would be this:
c = get_config()
try:
import curses
curses.initscr()
except:
pass
else:
try:
if not curses.has_colors():
c.InteractiveShell.colors = "NoColor"
finally:
curses.endwin()
This could also go into the regular Sage ipython startup
Thanks, Nils. That worked.
Use "sage -ipython profile list" to find out where your profile is (it
wasn't using ~/.ipython/, it was using ~/.sage/ipython-0.12/), then put the
following lines into ~/.sage/ipython-0.12/profile_default/ipython_config.py:
c = get_config()
try:
import curses
Same problem with straight ipython.
Bill
On Friday, September 20, 2013 11:12:37 AM UTC-7, William wrote:
>
> Hi,
>
> What happens if you run straight ipython?
>
>sage -ipython
>
> If the problem is the same, you could ask on the ipython list...
> (since sage's command line is ipython).
>
Not that this bug shouldn't be fixed, and not that there aren't valid reasons
for running sage in an emacs shell, but just in case you didn't know: you can
install the sage_mode spkg and run sage directly using the `sage' command.
-Ivan
On Sep 20, 2013, at 11:54 AM, Bill Janssen wrote:
> In a
On Friday, September 20, 2013 11:12:37 AM UTC-7, William wrote:
>
> If the problem is the same, you could ask on the ipython list...
> (since sage's command line is ipython).
>
> William
>
> It is. I don't think IPython's prompt configuration looks at the
> environment TERM at all. It's fully
Hi,
What happens if you run straight ipython?
sage -ipython
If the problem is the same, you could ask on the ipython list...
(since sage's command line is ipython).
William
On Fri, Sep 20, 2013 at 10:54 AM, Bill Janssen wrote:
> In an Emacs shell, Sage seems to be ignoring the TERM setting
In an Emacs shell, Sage seems to be ignoring the TERM setting (dumb) and
sending ANSI escape sequences to the terminal around the "sage:" prompt.
[pippin:~] wjanssen% printenv TERM
dumb
[pippin:~] wjanssen% /local/sage-5.11/sage
+---