This works:

sage: maxima_calculus.load('to_poly_solve')
\"/usr/local/sage/sage-git/local/share/maxima/5.35.1/share/to_poly_solve/to_poly_solve.mac\"

whereas this does not:

sage: maxima_calculus.load('to_poly_solve.mac')
TypeError: ECL says: In function PATHNAME, the value of the only argument is
  ((MNCTIMES SIMP) $TO_POLY_SOLVE $MAC)
which is not of the expected type (OR FILE-STREAM STRING PATHNAME)

(clearly, the filename is parsed rather than taken as a string)

This does seem to work:

sage: maxima_calculus.load('"to_poly_solve.mac"')
\"/usr/local/sage/sage-git/local/share/maxima/5.35.1/share/to_poly_solve/to_poly_solve.mac\"

as does this:

sage: 
maxima_calculus.load('"/usr/local/sage/sage-git/local/share/maxima/5.35.1/share/to_poly_solve/to_poly_solve.mac"')
\"/usr/local/sage/sage-git/local/share/maxima/5.35.1/share/to_poly_solve/to_poly_solve.mac\"

so it looks like there's nothing particularly wrong with the load command 
once you let it deal with strings properly.

If you want to take it a little closer to the metal you can do

sage: maxima_calculus._eval_line('load("to_poly_solve.mac")')
'\\"/usr/local/sage/sage-git/local/share/maxima/5.35.1/share/to_poly_solve/to_poly_solve.mac\\"

which seems to work as well. 

Working with a nonexisting file gives a rather uninformative error message:

sage: maxima_calculus.load('"blah.mac"')
TypeError: ECL says: Error executing code in Maxima:

whereas maxima tells exactly what goes wrong. So the error message 
capturing technology can perhaps be improved.

-- 
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 sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to