3.2 A Cell

Module: sage.server.notebook.cell

A Cell.

A cell is a single input/output block. Worksheets are built out of a list of cells.

Examples in this module are not automatically tested.

Module-level Functions

format_exception( s0, ncols)

number_of_rows( txt, ncols)

Class: Cell

class Cell
Cell( self, id, input, out, worksheet)

Functions: cell_output_type,$  $ changed_input_text,$  $ computing,$  $ directory,$  $ do_time,$  $ doc_html,$  $ edit_text,$  $ evaluate,$  $ files,$  $ files_html,$  $ has_output,$  $ html,$  $ html_in,$  $ html_new_cell_after,$  $ html_new_cell_before,$  $ html_out,$  $ id,$  $ input_text,$  $ interrupt,$  $ interrupted,$  $ introspect,$  $ introspect_html,$  $ is_asap,$  $ is_auto_cell,$  $ is_html,$  $ is_interacting,$  $ is_interactive_cell,$  $ is_last,$  $ is_no_output,$  $ next_id,$  $ notebook,$  $ output_html,$  $ output_text,$  $ parse_html,$  $ plain_text,$  $ process_cell_urls,$  $ sage,$  $ set_asap,$  $ set_cell_output_type,$  $ set_changed_input_text,$  $ set_id,$  $ set_input_text,$  $ set_introspect,$  $ set_introspect_html,$  $ set_is_html,$  $ set_no_output,$  $ set_output_text,$  $ set_worksheet,$  $ stop_interacting,$  $ time,$  $ unset_introspect,$  $ update_html_output,$  $ url_to_self,$  $ version,$  $ word_wrap_cols,$  $ worksheet,$  $ worksheet_filename

doc_html( self, [wrap=None], [div_wrap=True], [do_print=False])
Modified version of self.html for the doc browser. This is a hack and needs to be improved. The problem is how to get the documentation html to display nicely between the example cells. The type setting (jsMath formating) needs attention too.

evaluate( self, [introspect=False], [time=False], [username=None])

Input:

username
- name of user doing the evaluation
time
- if True return time computation takes
introspect
- either False or a pair [before_cursor, after_cursor] of strings.

is_asap( self)

Return True if this is an asap cell, i.e., evaluation of it is done as soon as possible.

is_interactive_cell( self)

Return True if this cell contains the use of interact either as a function call or a decorator.

is_no_output( self)

Return True if this is an no_output cell, i.e., a cell for which we don't care at all about the output.

update_html_output( self, [output=])

Update the list of files with html-style links or embeddings for this cell.

For interactive cells the html output section is always empty, mainly because there is no good way to distinguish content (e.g., images in the current directory) that goes into the interactive template and content that would go here.

Special Functions: __cmp__,$  $ __init__,$  $ __repr__,$  $ _directory_name

Class: Cell_generic

class Cell_generic

Functions: is_interactive_cell

Class: ComputeCell

class ComputeCell
ComputeCell( self, id, input, out, worksheet)

Functions: cell_output_type,$  $ changed_input_text,$  $ computing,$  $ directory,$  $ do_time,$  $ doc_html,$  $ edit_text,$  $ evaluate,$  $ files,$  $ files_html,$  $ has_output,$  $ html,$  $ html_in,$  $ html_new_cell_after,$  $ html_new_cell_before,$  $ html_out,$  $ id,$  $ input_text,$  $ interrupt,$  $ interrupted,$  $ introspect,$  $ introspect_html,$  $ is_asap,$  $ is_auto_cell,$  $ is_html,$  $ is_interacting,$  $ is_interactive_cell,$  $ is_last,$  $ is_no_output,$  $ next_id,$  $ notebook,$  $ output_html,$  $ output_text,$  $ parse_html,$  $ plain_text,$  $ process_cell_urls,$  $ sage,$  $ set_asap,$  $ set_cell_output_type,$  $ set_changed_input_text,$  $ set_id,$  $ set_input_text,$  $ set_introspect,$  $ set_introspect_html,$  $ set_is_html,$  $ set_no_output,$  $ set_output_text,$  $ set_worksheet,$  $ stop_interacting,$  $ time,$  $ unset_introspect,$  $ update_html_output,$  $ url_to_self,$  $ version,$  $ word_wrap_cols,$  $ worksheet,$  $ worksheet_filename

doc_html( self, [wrap=None], [div_wrap=True], [do_print=False])
Modified version of self.html for the doc browser. This is a hack and needs to be improved. The problem is how to get the documentation html to display nicely between the example cells. The type setting (jsMath formating) needs attention too.

evaluate( self, [introspect=False], [time=False], [username=None])

Input:

username
- name of user doing the evaluation
time
- if True return time computation takes
introspect
- either False or a pair [before_cursor, after_cursor] of strings.

is_asap( self)

Return True if this is an asap cell, i.e., evaluation of it is done as soon as possible.

is_interactive_cell( self)

Return True if this cell contains the use of interact either as a function call or a decorator.

is_no_output( self)

Return True if this is an no_output cell, i.e., a cell for which we don't care at all about the output.

update_html_output( self, [output=])

Update the list of files with html-style links or embeddings for this cell.

For interactive cells the html output section is always empty, mainly because there is no good way to distinguish content (e.g., images in the current directory) that goes into the interactive template and content that would go here.

Special Functions: __cmp__,$  $ __init__,$  $ __repr__,$  $ _directory_name

Class: TextCell

class TextCell
TextCell( self, id, text, worksheet)

Functions: edit_text,$  $ html,$  $ id,$  $ is_auto_cell,$  $ plain_text,$  $ set_cell_output_type,$  $ set_input_text,$  $ set_worksheet

html( self, ncols, [do_print=False], [do_math_parse=True])

Input:

do_math_parse
- bool (default: True) If True, call math_parse (defined in cell.py) on the html.

Special Functions: __cmp__,$  $ __init__

See About this document... for information on suggesting changes.