axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Axiom-developer] Maxima on MathAction and Sage


From: Page, Bill
Subject: RE: [Axiom-developer] Maxima on MathAction and Sage
Date: Thu, 10 Aug 2006 13:34:23 -0400

Alfredo,

I see you are using the Clisp verision of Maxima.
I suppose that might create some minor differences.

In my experience the error message "Maxima output parse
error" is most generated if for some reason the routine
'renderMaxima' in 'maximaWrapper.py' is not able to split
the maxima output into the same number of sections as
occurred in the input. Recall that the input consists of
a series of

  batch("section1.max");
  batch("section2.max");

commands. When maxima executes these commands that result
is a series of <prompt> ... </prompt> output that serves to
delimit the output. After some experimentation I determined that
the follow regular expression worked reliably for me:

outputSplit = '<prompt>.*</prompt>\nbatching #p.*\n'

Maybe the output is subtley different from Clisp? I find writing
reliable Python regular expressions to be very tediouos.
Comparing your output below to this pattern:

<prompt>(\mathrm{\$\%i}1)
</prompt><latex>\mbox{\tt\red(\mathrm{\$\%o1}) \black}4</latex>

It looks like this splitting might fail because there is no \n
after </prompt>. You could try changing the regular expression
to something like this:

outputSplit = '<prompt>.*</prompt>\s*batching #p.*\n'

Note: the output string "batching" is apparently generated
by maxima when it processes a batch() command. The only reason
it is part of this patter is so that it can be conveniently
ignored - just some Python trickery... :)

If you could create a test.input file containing several

  batch("section1.max");
  batch("section2.max");

commands containing other maxima commands and then run

  maxima < test.input >test.output

then send me the file, I will try to help you debug this.

Regards,
Bill Page.

> -----Original Message-----
> From: Alfredo Portes [mailto:address@hidden 
> Sent: Thursday, August 10, 2006 11:55 AM
> To: address@hidden
> Subject: Re: [Axiom-developer] Maxima on MathAction and Sage
> 
> Hi Bill,
> 
> I am having a little issue with the Maxima output, just getting:
> 
> Maxima output parse error!
> 
> You can see the output here: http://doyen.sytes.net/Doyen/SandBox
> 
> I run the command manually, and get the right output.
> 
> echo "2+2;" | /usr/bin/maxima -p
> /var/lib/zope/Products/LatexWiki/mathaction-maxima-5.9.3.lisp
> >output.txt
> 
> output.txt
> 
> <maxima>
> Maxima 5.9.3.99rc2 http://maxima.sourceforge.net
> Using Lisp CLISP 2.39 (2006-07-16)
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> This is a development version of Maxima. The function bug_report()
> provides bug reporting information.
> <prompt>(\mathrm{\$\%i}1)
> </prompt><latex>\mbox{\tt\red(\mathrm{\$\%o1}) \black}4</latex>
> <prompt>(\mathrm{\$\%i}2) </prompt></maxima>
> 
> Any advice I would appreciate it,
> 
> Regards,
> 
> Jose Alfredo Perez
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]