Ask Your Question

sjr's profile - activity

2018-06-30 17:23:41 -0600 received badge  Popular Question (source)
2018-06-30 17:23:41 -0600 received badge  Notable Question (source)
2013-12-02 02:48:45 -0600 marked best answer Running sage on an input file via the command line

The reason is that the image is stored in a temporary subdirectory of your ~/.sage/temp directory, but this temporary directory is removed when the execution of your abc.sage script is finished (the name of the directory depends on the process that created it). So when your image viewer is launched, it cannot find it anymore. You can check this by adding the line:

sleep(100)

at the end of your abc.sage script, and your image viewer will have the time to get the image before it disapears.

You can also launch Sage and in the Sage command line, and then type:

sage: %runfile abc.sage
2013-12-02 02:48:45 -0600 received badge  Scholar (source)
2013-12-02 02:48:41 -0600 commented answer Running sage on an input file via the command line

Thanks! Problem solved.

2013-12-02 02:48:04 -0600 received badge  Supporter (source)
2013-12-02 02:11:36 -0600 asked a question Running sage on an input file via the command line

I have a file abc.sage that contains the commands plot(x^2).show(). From the command line I run "sage abc.sage". The plot command is executed, the viewer appears, and I get a message that a certain png file is not present where expected. Any solutions?

2013-02-23 03:32:18 -0600 received badge  Student (source)
2013-02-22 20:05:00 -0600 received badge  Editor (source)
2013-02-22 20:03:44 -0600 asked a question How to get the ed command in the ipython shell to preparse its sourcefiles?

Using the Sage version of the IPython shell, the "ed" command brings up an editor for creating a sage script which is executed automatically when the editor is closed. Unfortunately, no preparsing takes place. For example, an expression like 2^3 or (2..3) is not interpreted in the expected way. Is it possible to configure the "ed" command so that preparsing takes place automatically?