Ask Your Question

Revision history [back]

sagetex's .sage file gives "runfile is not defined"


SageTeX creates for me a .sage file. When I run Sage on that it fails, giving me an error from Python that the runfile command is not known (after apparently creating a .py file). I didn't see what I am doing wrong in the docs or by googling (sorry if I missed it). I'd be grateful for any tips about how to work around the issue. Here is the command line from a MWE.

$ sage test.sagetex.sage
Processing Sage code for test.tex...
Code block begin...
**** Error in Sage code on line 12 of test.tex! Traceback follows.
Traceback (most recent call last):
  File "", line 9, in <module>
NameError: name 'runfile' is not defined

**** Running Sage on test.sage failed! Fix test.tex and try again.

Here is the MWE.


p = plot_circle_action(1,0,0,1) 
p.set_axes_range(-1.5, 1.5, -0.5, 1.5)"graphics/svd000.png",dpi=1200)

Here is the version.

$ sage --version
Sage Version 6.1.1, Release Date: 2014-02-04

(I'm on a recent Ubuntu.)