ipythonrc and Sage 5.7

55 views
Skip to first unread message

Luis Finotti

unread,
Feb 25, 2013, 12:59:32 PM2/25/13
to sage-s...@googlegroups.com
Dear all,

I've compiled 5.7 from source (64 bit, linux) and noticed I lost colors and output numbering I had set in "~/.sage/ipython/ipythonrc" (for the command line).  Although quite minor, I thought I should make sure if this is a bug or just a change in behavior.

Thanks,

Luis


John H Palmieri

unread,
Feb 25, 2013, 2:09:48 PM2/25/13
to sage-s...@googlegroups.com
On Monday, February 25, 2013 9:59:32 AM UTC-8, Luis Finotti wrote:
Dear all,

I've compiled 5.7 from source (64 bit, linux) and noticed I lost colors and output numbering I had set in "~/.sage/ipython/ipythonrc" (for the command line).  Although quite minor, I thought I should make sure if this is a bug or just a change in behavior.


Sage 5.7 included an upgrade to IPython, and the old IPython files were no longer compatible with the new version. So now Sage looks in ~/.sage/ipython-0.12/ for configuration.

--
John

Luis Finotti

unread,
Feb 26, 2013, 11:52:39 AM2/26/13
to sage-s...@googlegroups.com


On Monday, February 25, 2013 2:09:48 PM UTC-5, John H Palmieri wrote:

Sage 5.7 included an upgrade to IPython, and the old IPython files were no longer compatible with the new version. So now Sage looks in ~/.sage/ipython-0.12/ for configuration.

--
John


Thanks for the reply.  I am still struggling with it.  I've created a configuration file with " ipython profile create".  I've noticed it was in the wrong place (it was not read at start up), so I've moved "ipython_config.py" from "~/.sage/ipython-0.12/profile_default/" to "~/.sage/ipython-0.12/profile_sage/".  The file is read on start up, as I had some syntax errors and had some tests.

From a newly generated config file,  "uncommenting" the line "c.PromptManager.out_template = 'Out[\\#]: '" has no effect.  Same for the line "c.TerminalInteractiveShell.colors = 'Linux'".  The file is read, as if I remove a single quote, I get an error message.

Any ideas?

Thanks,

Luis

John H Palmieri

unread,
Feb 26, 2013, 12:32:03 PM2/26/13
to sage-s...@googlegroups.com

My guess is that Sage is overriding these settings, and I don't know how to fix that with config files. If you edit the file SAGE_ROOT/devel/sage/sage/misc/interpreter.py, in particular DEFAULT_SAGE_CONFIG, you can change the behavior, but this it not the ideal solution.

--
John

John H Palmieri

unread,
Feb 26, 2013, 2:07:07 PM2/26/13
to sage-s...@googlegroups.com


On Tuesday, February 26, 2013 9:32:03 AM UTC-8, John H Palmieri wrote:


On Tuesday, February 26, 2013 8:52:39 AM UTC-8, Luis Finotti wrote:


On Monday, February 25, 2013 2:09:48 PM UTC-5, John H Palmieri wrote:

Sage 5.7 included an upgrade to IPython, and the old IPython files were no longer compatible with the new version. So now Sage looks in ~/.sage/ipython-0.12/ for configuration.


I think with the patch at <http://trac.sagemath.org/sage_trac/ticket/14188>, Sage will read your file "~/.sage/ipython-0.12/profile_
sage/ipython_config.py" correctly.

--
John

Luis Finotti

unread,
Feb 26, 2013, 2:29:02 PM2/26/13
to sage-s...@googlegroups.com


On Tuesday, February 26, 2013 2:07:07 PM UTC-5, John H Palmieri wrote:

I think with the patch at <http://trac.sagemath.org/sage_trac/ticket/14188>, Sage will read your file "~/.sage/ipython-0.12/profile_
sage/ipython_config.py" correctly.


The patch works for me!  Thanks for your help!

Luis
Reply all
Reply to author
Forward
0 new messages