Jason -- Thanks for quick followup. I'm not sure what it would mean for me to "publish" such a worksheet, since students will not have any access to any of my pages. (In fact, in the lab, I myself won't have any worksheets.) Also, perhaps I'm a little dense, but am new to this setup. When you say have the students "execute"
with open(os.path.join(os.environ['DOT_SAGE'], 'init.sage'), 'w') as f: f.write('gap._....') . . . where and how do they execute this? (It is a language I do not recognize. Sage? Python?). I would certainly prefer *not* to instruct students to enter such a complicated obscure command without explanation (I prefer my students to understand everything they enter), and it is so complicated that many of them are likely to enter it incorrectly creating havoc. It would be better to change the original .sage directory to contain the init.sage, if I can get that method to work and figure out how to get it into their .sage directory when they start up initially. The underlying issue here that you may not understand is that the students are working in a lab in which every machine is totally wiped each evening. I have managed to find a way for students to save and restore their ".sage" directory to a very small cloud storage space, so they can restore their work when they return, but otherwise they start over each day. Thanks! On Friday, June 29, 2012 11:13:40 AM UTC-5, Jason Grout wrote: > > 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