Package sage :: Package server :: Package notebook :: Module test_notebook :: Class Playback_Notebook_Session
[hide private]
[frames] | no frames]

Class Playback_Notebook_Session

source code

                      object --+    
                               |    
structure.sage_object.SageObject --+
                                   |
                                  Playback_Notebook_Session

Instance Methods [hide private]
 
__init__(self, dir='sage_notebook', sobj='nb.sobj')
Test the Notebook by taking an already existing Notebook directory that was produced by running a Notebook session like so: "notebook(log_server=True)" After that session is completed a log will have been formed that has every GET and POST that the Notebook server handled.
source code
 
load_nb_sobj(self, dir) source code
 
get_NB_server_log(self) source code
 
get_NBTEST_server_log(self) source code
 
move_old_NBTEST(self)
Safely 'remove' an old testing notebook...could be done differently.
source code
 
playback(self, port=8000)
Play back the server log of a previously run...
source code
 
compare_log_lengths(self)
Compare the lengths of the nblog and the testnblog.
source code
 
_gets_posts(self, log, gets=True, posts=True)
Given a server log, this function goes through the log and extracts either all the GET requests, all the POST requests, or both.
source code
 
_unique_occurances(self, log, gets=True, posts=True)
Counts unqiue occurances of GET, POST or both.
source code
 
_track_occurances(self, log, gets=True, posts=True)
Given a server log, this function counts, in temporal order, all requests, (gets, posts, both) and returns a list of tuples, where each tuple has ("the_request", n), where n is the number of times "the_request" occured in a row.
source code
 
server_log_bar_chart(self, gets=True, posts=True)
Make a bar chart from a server log.
source code

Inherited from structure.sage_object.SageObject: __hash__, __new__, __repr__, _axiom_, _axiom_init_, _gap_, _gap_init_, _gp_, _gp_init_, _interface_, _interface_init_, _interface_is_cached_, _kash_, _kash_init_, _macaulay2_, _macaulay2_init_, _magma_, _magma_init_, _maple_, _maple_init_, _mathematica_, _mathematica_init_, _maxima_, _maxima_init_, _octave_, _octave_init_, _pari_, _pari_init_, _r_init_, _sage_, _singular_, _singular_init_, category, db, dump, dumps, plot, rename, reset_name, save, version

Inherited from object: __delattr__, __getattribute__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, dir='sage_notebook', sobj='nb.sobj')
(Constructor)

source code 

Test the Notebook by taking an already existing 
Notebook directory that was produced by running
a Notebook session like so:

"notebook(log_server=True)"

After that session is completed a log will have
been formed that has every GET and POST that the
Notebook server handled.

If the Notebook dir is not specified then
dir='sage_notebook' and  sobj='nb.sobj'

Overrides: object.__init__

playback(self, port=8000)

source code 

Play back the server log of a previously run
notebook that had been run in the following way:

EXAMPLES:
   sage: notebook(log_server=True)    # not tested