> Hi,
>
> [Using 'Sage Version 4.4.4, Release Date: 2010-06-23' on Kubuntu
> 10.04.]
>
> The following seems like it must come up a lot, but I have not been
> able to find an answer (apologies if I missed it somewhere).
>
> I built a worksheet with several cells in the notebook, and then
> wanted to try to run it on a remote computer using the command line
> interface. But I could not find a convincing way to export the
> worksheet to a simple text file that I could import directly to sage,
> i.e. a "something.sage" file.
There's more to a worksheet than the sage commands.
You want to create a worksheet file (foo.sws), using "File->save
worksheet to a file..." (the 'File' menu on the worksheet). From
there you can "File->load worksheet from file".
HTH
Justin
--
Justin C. Walker
Curmudgeon at Large
Director
Institute for the Enhancement of the Director's Income
--
Build a man a fire and he'll be warm
for a night.
Set a man on fire and he'll be warm
for the rest of his life.
> That doesn't work for me, since I want to import from the command line
> interface.
> So, as far as I can tell, I can't import the binary .sws worksheet
> file -- I need a plain Python script, or a "something.sage" file.
>
> So my more precise question is:
> How can I extract the sage commands from a worksheet into a plaintext
> script which I can run from the command-line interface to sage (e.g.
> on a remote machine)?
FWIW, Mathematica allows one to do what you want, so if Sage does not,
it would seem wise the functionality was added.
Dave