On 6/29/12 11:06 AM, Walter Carlip wrote:

Assuming I can get the commands in the init.sage file in .sage to work,
we have the basis of a solution, but I'm not
entirely sure how to get these init.sage files into the home directories
of each student. When sage starts up, how
does it go about creating its initial .sage directory? If this is to be
our solution, we will have to do it right away
-- before students first lab visit. In order to preserve work from
session to session, I'm having students save and
restore their .sage directory between sessions, so whatever get's put
into .sage for initialization the first day will
be restored every session. (Perhaps you can suggest a better way to
preserve data between sessions, but I
could not find another way.)

You could also just have them execute:

with open(os.path.join(os.environ['DOT_SAGE'], 'init.sage'), 'w') as f:
    f.write('gap._....')

in some cell the first day. Or you could just publish a worksheet with that code, maybe even in a %auto block.

Or even:

%sh
echo gap._... >> $DOT_SAGE/init.sage


Jason


--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to