> There is something kind of like this right now. > > 1. Click Data --> Create file > 2. Enter the name of a new file (third box) then click "Upload" -- ok > that's dumb -- there should be a create button. > 3. Put > def foo(n,m): > return n*m > in the box and click save. > 4. Type this into your worksheet: > load foo.sage > foo(2,3) > and get "6". > 5. Select Data --> foo.sage > 6. Select "create linked copy of file" and select another worksheet. > 7. Click save.
This is close to what I had in mind. Some drawbacks to this approach: --There should be a nice way to attach a data file to the current worksheet rather than having to go to the data file's page, and select which worksheet you want to link it to from there. --It is much easier to edit code in the notebook cells than in the provided data box. --It's not easy to tell which data files are accessible from a given worksheet. What I had in mind for two was that when you attached another worksheet (via some drop-down menu or ...) then all of its cells would be evaluated on startup in the current worksheet's namespace. This would allow one to interactively write and test functions that can easily be used from other worksheets. All that being said, I think a notebook coding sprint would be very good. --Mike > > Then you can use foo.sage in either worksheet by loading it, but there > is only one file behind the scenes -- editing foo.sage in either edits that > one file. > > For your (2), how precisely would you like to refer to another > worksheet? Would the whole > thing get evaluated when you "load" it or something? > > > (3) Same as your #3. > > > > --Mike > > > > > > > > > > > -- > William Stein > Associate Professor of Mathematics > University of Washington > http://wstein.org > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---