preparser(False) doesn't work with attach()
This is a more basic version of my previous question http://ask.sagemath.org/question/2469..., which had distracting details.
In William Stein's Sage for Power Users (http://wstein.org/books/sagebook/sage...), end of Section 2.2 and top of page 13, there is an example of how to turn the preparser off in the sage interpreter. The example works as claimed and here it is copied from my own computer:
sage: preparser(False) sage: N=2/3 + 2^3 sage: N 1 sage: preparser(True) sage: M=2/3 + 2^3 sage: M 26/3
But now suppose that I want to put (almost) exactly the same lines into a .sage file called 'preparsertest.sage', close sage, reopen it, and then type attach('preparsertest.sage') into the interpreter. Naively I expect the same behaviour but that's not what I get.
Here is the content of 'preparsertest.sage':
preparser(False) N=2/3 + 2^3 preparser(True) M=2/3+2^3
Here is the output from the interpreter:
sage: attach('preparsertest.sage') sage: N 26/3 sage: M 26/3
So it seems that when I attach 'preparsertest.sage', the line preparser(False) is not being read.
P.S. I tried to figure out how to attach a screen shot but it didn't work, and I didn't find instructions on ask.sagemath.org.