On Sun, Jul 20, 2008 at 4:34 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote: >> If you're using the system-wide python why does Sage's copy of >> IPython have anything to do with anything? I guess I'm basically >> asking why you are having to program around a problem with >> Ipython in order to do some sort of testing with Sage? For example, >> when Sage's doctests run IPython is never involved at all; it's >> not even imported. > > I don't want to have anything in common with ipython, but sage invokes > it on import sage.all, as can be checked easily:
Wow, that sucks. Thanks for pointing this out!! It is a major bug which i'll fix asap: http://trac.sagemath.org/sage_trac/ticket/3685 Thanks again -- I really appreciate this. William > > [EMAIL PROTECTED]:~/ext/sage$ . local/bin/sage-env > [EMAIL PROTECTED]:~/ext/sage$ python > Python 2.5.2 (r252:60911, Jul 11 2008, 05:28:36) > [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import sage.all >>>> > > Then apply this patch: > > --- /tmp/genutils.py 2008-07-20 16:33:15.000000000 +0200 > +++ local/lib/python2.5/site-packages/IPython/genutils.py 2008-07-20 > 16:33:26.553433732 +0200 > @@ -54,6 +54,7 @@ > if not hasattr(stream,'write') or not hasattr(stream,'flush'): > stream = fallback > self.stream = stream > + stop > self._swrite = stream.write > self.flush = stream.flush > > > > and: > > [EMAIL PROTECTED]:~/ext/sage$ python > Python 2.5.2 (r252:60911, Jul 11 2008, 05:28:36) > [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import sage.all > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/home/ondra/ext/sage/local/lib/python2.5/site-packages/sage/all.py", > line 58, in <module> > from sage.misc.all import * # takes a while > File > "/home/ondra/ext/sage/local/lib/python2.5/site-packages/sage/misc/all.py", > line 15, in <module> > from sage_timeit_class import timeit > File "sage_timeit_class.pyx", line 3, in sage.misc.sage_timeit_class > (sage/misc/sage_timeit_class.c:485) > File > "/home/ondra/ext/sage/local/lib/python2.5/site-packages/sage/misc/sage_timeit.py", > line 12, in <module> > import timeit as timeit_, time, math, preparser, interpreter > File > "/home/ondra/ext/sage/local/lib/python2.5/site-packages/sage/misc/interpreter.py", > line 108, in <module> > from IPython.iplib import InteractiveShell > File > "/home/ondra/ext/sage/local/lib/python2.5/site-packages/IPython/__init__.py", > line 57, in <module> > __import__(name,glob,loc,[]) > File > "/home/ondra/ext/sage/local/lib/python2.5/site-packages/IPython/ipstruct.py", > line 22, in <module> > from IPython.genutils import list2dict2 > File > "/home/ondra/ext/sage/local/lib/python2.5/site-packages/IPython/genutils.py", > line 95, in <module> > Term = IOTerm() > File > "/home/ondra/ext/sage/local/lib/python2.5/site-packages/IPython/genutils.py", > line 90, in __init__ > self.cin = IOStream(cin,sys.stdin) > File > "/home/ondra/ext/sage/local/lib/python2.5/site-packages/IPython/genutils.py", > line 57, in __init__ > stop > NameError: global name 'stop' is not defined >>>> > > > > Ondrej > > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---