In fact, sage/misc/log.py uses very old ipython features, which seem to be long gone. A modern way to say e.g. the whole command history to /tmp/xxx.log would be to run
sage: %history -f /tmp/xxx.log See https://stackoverflow.com/questions/16858724/how-to-log-ipython-history-to-text-file/39413200 for more details HTH Dima On Wed, Oct 30, 2019 at 6:19 PM Dima Pasechnik <[email protected]> wrote: > > This is a bug > See https://trac.sagemath.org/ticket/28677 > Thanks for reporting it - it's a good example of code bitrot due to no > tests... :-) > > On Wed, Oct 30, 2019 at 4:21 PM Max Alekseyev <[email protected]> wrote: > > > > Please advise on the following error. > > Thanks, > > Max > > > > ┌────────────────────────────────────────────────────────────────────┐ > > │ SageMath version 8.9, Release Date: 2019-09-29 │ > > │ Using Python 2.7.15. Type "help()" for help. │ > > └────────────────────────────────────────────────────────────────────┘ > > sage: import sage.misc.log > > sage: sage.misc.log.log_text() > > --------------------------------------------------------------------------- > > AttributeError Traceback (most recent call last) > > <ipython-input-2-ace4f1da0972> in <module>() > > ----> 1 sage.misc.log.log_text() > > > > /usr/local/SageMath.89/local/lib/python2.7/site-packages/sage/misc/log.pyc > > in __init__(self, dir, debug, viewer) > > 97 self._dir = dir > > 98 self._filename = os.path.join(dir, self._filename()) > > ---> 99 self._output = __IPYTHON__.output_hist > > 100 self._input = __IPYTHON__.input_hist_raw > > 101 self._text = '' > > > > AttributeError: 'bool' object has no attribute 'output_hist' > > > > -- > > You received this message because you are subscribed to the Google Groups > > "sage-devel" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/sage-devel/dcd4e90d-5af8-416f-9c4b-243677f5835a%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq3YxhKZF3m%2BxU4HrCLSKjnjmnED7X1eoYneiuBXXjvxtQ%40mail.gmail.com.
