Quantcast
Channel: ASKSAGE: Sage Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 9

Answer by John Palmieri for The sage tutorial Loading and Attaching Sage files states that if I create a file such as walk.sage containing:print "Hello world" print 2^4 and then load or attach it:sage: attach 'walk.sage' Hello world 16 I should get a walk.py file containing python code in the same directory as walk.sage. I can find no such file (I've even searched my the rest of my computer). Does anyone know where the file is?

$
0
0
(Edit: I originally thought that there wasn't a file walk.py, but I think that's wrong.) Look in `$HOME/.sage/temp/DIR0/DIR1/` where `$HOME` is your home directory, DIR0 has a name like `$HOSTNAME` and DIR1 is a number, the process id of the Sage process. This directory is deleted when you quit Sage. If you want to produce a more permanent file `walk.py`, then from your shell prompt, run `sage --preparse walk.sage`. This will produce `walk.py` in the current directory.

Viewing all articles
Browse latest Browse all 9

Trending Articles