On Jan 14, 2008 10:33 PM, Dan Drake <[EMAIL PROTECTED]> wrote:
> On Mon, 14 Jan 2008 at 05:05PM -0800, William Stein wrote:
> > On Jan 14, 2008 5:00 PM, Dan Drake <[EMAIL PROTECTED]> wrote:
> > > In a .sage script file, I have:
> > >
> > >   maple.eval('plotsetup(ps, plotoutput=`logplot.eps`, \
> > >     plotoptions=`portrait,noborder,color`)')
> > >   maple.eval('plot(log(2*x), x=1..2,filled=true,color=yellow, \
> > >     view=[.75..2.25,0..1.5])')
> > >
> > > but the corresponding .py file has, for the second command,
> > >
> > >   maple.eval('plot(log(2*x), x=1..2,filled=true,color=yellow, \
> > >     view=(ellipsis_range(.75,Ellipsis,2.25,0,Ellipsis,1.5)))')
> > >
> > > Maple obviously doesn't understand this. It seems the preparser is a
> > > bit too eager; it needs to ignore stuff that will get passed to
> > > Maple or whatever. Can this be fixed?
> >
> > The problem is the multiple lines.  Try the same thing but without the
> > \ at the end of the line and see what happens.
>
> It works fine in that case...which I discovered (naturally) a minute or
> two after sending the message.
>
> Looks like the preparser is not aware of the
> backslash-continues-the-line convention.

The parts of the preparser I wrote are:

sage: v = '1 + \
....: 3'
sage: v
'1 + 3'

But Robert B. wrote the really cool [n..m] parser code,
and unfortunately he appears to have written it in a way that
does not work correctly with \'s.  He'll undoubtedly see
this and fix it.

I've made this trac #1781:
    http://trac.sagemath.org/sage_trac/ticket/1781

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to