ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 15 Sep 2016 15:11:36 -0500Where should I save my sage files?http://ask.sagemath.org/question/34825/where-should-i-save-my-sage-files/ I am new to using sage from the terminal. Is there an organized way to store .sage files to make it easy to load the file into the terminal. I would like to avoid retyping the whole path into the terminal. Thu, 15 Sep 2016 06:25:44 -0500http://ask.sagemath.org/question/34825/where-should-i-save-my-sage-files/Answer by tmonteil for <p>I am new to using sage from the terminal. Is there an organized way to store .sage files to make it easy to load the file into the terminal. I would like to avoid retyping the whole path into the terminal. </p>
http://ask.sagemath.org/question/34825/where-should-i-save-my-sage-files/?answer=34828#post-id-34828Note that `%attach` also accept relative paths, so instead of changing where your files are, you can change where sage is started from. Assume that the `sage` command belongs to your path (e.g. by symlinking it from `/usr/local/bin/sage`), you just run sage from your favorite working directory and type:
sage: %attach my_file.sage
Depending on where you are, th following also works:
sage: %attach ../my_file.sageThu, 15 Sep 2016 15:11:36 -0500http://ask.sagemath.org/question/34825/where-should-i-save-my-sage-files/?answer=34828#post-id-34828