Ask Your Question

sjr's profile - activity

2018-07-01 00:23:41 +0200 received badge  Notable Question (source)
2018-07-01 00:23:41 +0200 received badge  Popular Question (source)
2013-12-02 09:48:45 +0200 received badge  Scholar (source)
2013-12-02 09:48:45 +0200 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:


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 09:48:41 +0200 commented answer Running sage on an input file via the command line

Thanks! Problem solved.

2013-12-02 09:48:04 +0200 received badge  Supporter (source)
2013-12-02 09:11:36 +0200 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 10:32:18 +0200 received badge  Student (source)
2013-02-23 03:05:00 +0200 received badge  Editor (source)
2013-02-23 03:03:44 +0200 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?