On Mar 7, 6:52 pm, William Stein <[email protected]> wrote:
> > 4.  Worksheet code suggests saves are based on per-user time
> > intervals, but my testing seems to suggest it is a notebook-wide
> > setting that prevails.  Consider
>
> > sage: nb = load('/home/rob/.sage/sage_notebook/nb.sobj',
> > compress=False)
> > sage: nb.user("rob-test")['autosave_interval']
> > 3600
> > sage: nb.user("fcla")['autosave_interval']
> > 180
> > sage: nb.user("admin")['autosave_interval']
> > 540
> > sage: nb.conf()['save_interval']
> > 60
>
> > With this configuration, running as "admin" I get 60-second saves.  At
> > first the 540 looked unfamiliar, but I think that came from a drop-
> > down box in the Settings area of the notebook interface (1,3,5,7,9
> > minute choices, IIRC).
>
> Interesting.  That must be a bug -- you should make a trac ticket for it.

I'll make a ticket tomorrow to discuss the various ways to handle
autosaves and make them easily user-configurable.

> > 6.  Here is a transcript at the sage command-line for adjusting
> > existing notebook.  Don't forget to save the changes!
> > See documentation/source for
>
> > sage.server.notebook.notebook.Notebook
> > sage.server.notebook.server_conf
>
> > sage: nb = load('/home/rob/.sage/sage_notebook/nb.sobj',
> > compress=False)
> > sage: type(nb)
> > <class 'sage.server.notebook.notebook.Notebook'>
> > sage: print nb.conf()
> > Configuration: {'number_of_backups': 3, 'doc_pool_size': 128,
> > 'save_interval': 30, 'idle_timeout': 0, 'word_wrap_cols': 72,
> > 'email': False, 'idle_check_interval': 30}
> > sage: nb.conf()['save_interval']=int(3600)
> > sage: nb.conf()['number_of_backups']=int(2)
> > sage: nb.conf()['max_history_length']=int(100)
> > sage: nb.conf()
> > Configuration: {'number_of_backups': 2, 'doc_pool_size': 128,
> > 'save_interval': 3600, 'idle_timeout': 0, 'max_history_length': 100,
> > 'word_wrap_cols': 72, 'email': False, 'idle_check_interval': 30}
> > nb.save()
>
> It couldn't hurt to add that to a docstring for user_conf.py while you're at 
> it.

Yes, I've added a shorter version of the above into the patch that is
ready at

http://trac.sagemath.org/sage_trac/ticket/5371

I couldn't figure out any kind of reasonable doctest, but the
docstring summarizes what user-conf.py does, and doesn't do, with the
alternatives documented.

Rob


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to