[IPython-dev] IPython issues in Sage

Ville M. Vainio vivainio@gmail....
Tue Jul 15 14:37:50 CDT 2008


On Tue, Jul 15, 2008 at 11:26 AM, Mike Hansen <mhansen@gmail.com> wrote:

> In my original message, I mentioned that I tried that and it
> eliminated the NameError, but then I get the issue where the main loop
> is never run.  Which is similar to what is happening here:

These problems are probably unrelated.

> http://trac.sagemath.org/sage_trac/ticket/1264 .  I wasn't able to
> figure out what Fernando did the last time to get rid of the problem.

That report seems to indicate that it happen because sage launches
ipython so that it enters "batch" mode and exits ipython. See the end
of "post_config_initialization" in iplib.py.

Your problem probably is that you are launching ipython the wrong way,
so that "rc.interact" option is not set. The old behaviour was broken
for the documented functionality of command line args -i and -c
(possibly the functionality was broken exactly for the benefit of
sage). How do you launch IPython from sage, exactly? Is sys.argv
clean? Does it have -c without -i?

Also, have you considered making a "sage profile"
(ipy_profile_sage.py) that would launch ipython first and only bring
in sage later on?

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'


More information about the IPython-dev mailing list