Ticket #6840: trac_6840-reviewer.patch

File trac_6840-reviewer.patch, 26.2 KB (added by mvngu, 12 years ago)

apply on top of previous patch

  • sage/server/introspect.py

    # HG changeset patch
    # User Minh Van Nguyen <nguyenminh2@gmail.com>
    # Date 1251778289 25200
    # Node ID 5b9a551e7b637aa7620d040fd6ef2e3f5f442abe
    # Parent  05a268f0db84d9aaf69843a2356856e463ade619
    trac 6840: reviewer patch; typo fixes
    
    diff -r 05a268f0db84 -r 5b9a551e7b63 sage/server/introspect.py
    a b  
    11"""
    22Sage Notebook Introspection
    33
    4 """
    5 
    6 """
    74TODO: - add support for grabbing source code from Pyrex functions
    85(even if not perfect is better than nothing). - PNG or MathML
    96output format for docstring
  • sage/server/misc.py

    diff -r 05a268f0db84 -r 5b9a551e7b63 sage/server/misc.py
    a b  
    7878import socket
    7979def find_next_available_port(start, max_tries=100, verbose=False):
    8080    """
    81     Find for the next available port, that is, a port for which a
     81    Find the next available port, that is, a port for which a
    8282    current connection attempt returns a 'Connection refused' error
    8383    message.  If no port is found, raise a RuntimError exception.
    8484
    8585    INPUT:
    8686
    87        - ``start`` - an int; the starting port number for the scan
     87    - ``start`` - an int; the starting port number for the scan
    8888
    89        - ``max_tries`` - an int (default: 100); how many ports to scan
     89    - ``max_tries`` - an int (default: 100); how many ports to scan
    9090
    91        - ``verbose`` - a bool (default: True); whether to print information
    92          about the scan
     91    - ``verbose`` - a bool (default: True); whether to print information
     92      about the scan
    9393
    9494    OUTPUT:
    9595
  • sage/server/notebook/cell.py

    diff -r 05a268f0db84 -r 5b9a551e7b63 sage/server/notebook/cell.py
    a b  
    275275
    276276    def id(self):
    277277        """
    278         Returns self's id.
     278        Returns self's ID.
    279279
    280280        OUTPUT:
    281281
    282         - int -- self's id.
     282        - int -- self's ID.
    283283       
    284284        EXAMPLES::
    285285       
     
    291291
    292292    def is_auto_cell(self):
    293293        """
    294         Returns true if self is automatically evaluated.
     294        Returns True if self is automatically evaluated.
    295295       
    296296        EXAMPLES::
    297297       
     
    303303
    304304    def __cmp__(self, right):
    305305        """
    306         Compares cells by `id`.
     306        Compares cells by ID.
    307307       
    308308        EXAMPLES::
    309309       
     
    734734
    735735    def __cmp__(self, right):
    736736        """
    737         Compares cells by their `id`s.
     737        Compares cells by their IDs.
    738738       
    739739        EXAMPLES::
    740740       
     
    10291029    def is_interacting(self):
    10301030        r"""
    10311031        Returns True if this cell is currently interacting with the user.
    1032 
    10331032       
    10341033        EXAMPLES::
    10351034       
     
    10391038            sage: C = W.new_cell_after(0, "@interact\ndef f(a=slider(0,10,1,5):\n    print a^2")
    10401039            sage: C.is_interacting()
    10411040            False
    1042        
    10431041        """
    10441042        return hasattr(self, 'interact')
    10451043
     
    10471045        """
    10481046        Stops interaction with user.
    10491047
    1050         TODO: Add doctests for :meth:`stop_interacting`.
    1051            
     1048        TODO: Add doctests for :meth:`stop_interacting`.           
    10521049        """
    10531050        if self.is_interacting():
    10541051            del self.interact
     
    13671364   
    13681365    def process_cell_urls(self, urls):
    13691366        """
    1370         Processes urls of the form 'cell://.*?' by replacing the
     1367        Processes URLs of the form ``'cell://.*?'`` by replacing the
    13711368        protocol with the path to self and appending self's version
    13721369        number.
    13731370
     
    13961393
    13971394        INPUT:
    13981395
    1399             - ``ncols`` -- maximum number of columns
     1396        - ``ncols`` -- maximum number of columns
    14001397           
    1401             - ``html`` -- boolean stating whether to output html
     1398        - ``html`` -- boolean stating whether to output HTML
    14021399           
    1403             - ``raw`` -- boolean stating whether to output raw text
    1404                         (takes precedence over html)
     1400        - ``raw`` -- boolean stating whether to output raw text
     1401          (takes precedence over HTML)
    14051402
    1406             - ``allow_interact`` -- boolean stating whether to allow interaction
     1403        - ``allow_interact`` -- boolean stating whether to allow interaction
    14071404
    14081405        EXAMPLES::
    14091406
     
    14661463        Parse HTML for output.
    14671464
    14681465        INPUT:
    1469 
    1470        
    1471             - ``s`` -- the input string containing HTML
     1466       
     1467        - ``s`` -- the input string containing HTML
    14721468           
    1473             - ``ncols`` -- maximum number of columns
    1474 
     1469        - ``ncols`` -- maximum number of columns
    14751470           
    14761471        EXAMPLES::
    14771472       
     
    17741769
    17751770    def introspect_html(self):
    17761771        """
    1777         Returns html for introspection.
     1772        Returns HTML for introspection.
    17781773
    17791774        EXAMPLES::
    17801775       
     
    19781973   
    19791974    def html(self, wrap=None, div_wrap=True, do_print=False):
    19801975        r"""
    1981         Returns the html for self.
     1976        Returns the HTML for self.
    19821977
    19831978        INPUT:
    19841979
    19851980        - ``wrap`` - a boolean stating whether to wrap lines. Defaults to
    1986           configuration if not given,
     1981          configuration if not given.
    19871982
    19881983        - ``div_wrap`` - a boolean stating whether to wrap ``div``.
    19891984
     
    21872182
    21882183    def files_html(self, out):
    21892184        """
    2190         Returns html to display the files in self's directory.
     2185        Returns HTML to display the files in self's directory.
    21912186
    21922187        INPUT:
    21932188
    21942189        - ``out`` - string to exclude files.
    2195                     Format: To exclude bar, foo, ...`'cell://bar cell://foo ...'`
     2190          Format: To exclude bar, foo, ... ``'cell://bar cell://foo ...'``
    21962191
    21972192        EXAMPLES::
    21982193
     
    22802275
    22812276    def html_out(self, ncols=0, do_print=False):
    22822277        r"""
    2283         Returns the html for self's output.
     2278        Returns the HTML for self's output.
    22842279
    22852280        INPUT:
    22862281       
    2287             - ``do_print`` -- a boolean stating whether to output html
    2288                              for print
     2282        - ``do_print`` -- a boolean stating whether to output HTML
     2283          for print
    22892284
    2290             - ``ncols`` -- the number of columns
     2285        - ``ncols`` -- the number of columns
    22912286
    22922287        EXAMPLES::
    22932288
  • sage/server/notebook/docHTMLProcessor.py

    diff -r 05a268f0db84 -r 5b9a551e7b63 sage/server/notebook/docHTMLProcessor.py
    a b  
    22Live Documentation in the Notebook
    33
    44Processes Sage documentation into notebook worksheet format with
    5 evaluatable examples.
     5evaluable examples.
    66
    77This takes in any HTML document, i.e., Sage documentation, and returns
    88it in the editable format (like the notebook edit window). It also
     
    1515
    1616Author:
    1717
    18     - Dorian Raymer (2006): first version
     18- Dorian Raymer (2006): first version
    1919
    20     - William Stein (2007-06-10): rewrite to work with twisted Sage notebook
     20- William Stein (2007-06-10): rewrite to work with twisted Sage notebook
    2121
    22     - Mike Hansen (2008-09-27): Rewrite to work with Sphinx HTML documentation
     22- Mike Hansen (2008-09-27): Rewrite to work with Sphinx HTML documentation
    2323"""
    2424#############################################################################
    2525#       Copyright (C) 2007 William Stein <wstein@gmail.com> and Dorian Raimer
     
    140140        All divs with CSS class="highlight" contain code examples.
    141141        They include
    142142
    143          - Models of how the function works.  These begin with, e.g.,
    144            'INPUT:' and are re-styled as divs with
    145            class="usage_model".
     143        - Models of how the function works.  These begin with, e.g.,
     144          'INPUT:' and are re-styled as divs with
     145          class="usage_model".
    146146
    147          - Actual Sage input and ouput.  These begin with 'sage:'.
    148            The input and output are separated according to the
    149            Notebook edit format.
     147        - Actual Sage input and output.  These begin with 'sage:'.
     148          The input and output are separated according to the
     149          Notebook edit format.
    150150
    151151        INPUT:
    152152
  • sage/server/notebook/interact.py

    diff -r 05a268f0db84 -r 5b9a551e7b63 sage/server/notebook/interact.py
    a b  
    1313
    1414AUTHORS:
    1515
    16     - William Stein (2008-03-02): version 1.0 at Sage/Enthought Days
    17        8 in Texas
     16- William Stein (2008-03-02): version 1.0 at Sage/Enthought Days
     17  8 in Texas
    1818
    19     - Jason Grout (2008-03): discussion and first few prototypes
     19- Jason Grout (2008-03): discussion and first few prototypes
    2020
    21     - Jason Grout (2008-05): :class:`input_grid` control
     21- Jason Grout (2008-05): :class:`input_grid` control
    2222"""
    2323
    2424"""
     
    101101   [ ] make option for text input that correctly gives something of
    102102       the same type as the default input.
    103103   [ ] matrix input control (method of matrix space) -- a spreadsheet like thing
    104    [ ] a 2d slider:
    105           u = ((xmin,xmax),(ymin,ymax))  2d slider   -- NOT IMPLEMENTED
    106    [ ] locator in a 2d graphic
     104   [ ] a 2-D slider:
     105          u = ((xmin,xmax),(ymin,ymax))  2-D slider   -- NOT IMPLEMENTED
     106   [ ] locator in a 2-D graphic
    107107   [ ] tab_view -- represents an object in which clicking the tab
    108108                   with label lbl[i] displays expr[i]
    109109   [ ] controls: make them easy to customize as below --
     
    221221
    222222    INPUT:
    223223
    224     - ``id`` - a string; the DOM id of the slider (better be unique)
     224    - ``id`` - a string; the DOM ID of the slider (better be unique)
    225225
    226226    - ``values`` - a string; 'null' or JavaScript string containing
    227227      array of values on slider
     
    230230      the slider is done moving
    231231
    232232    - ``steps`` - an integer; number of steps from minimum to maximum
    233       value.
     233      value
    234234
    235235    - ``default`` - an integer (default: 0); the default position of
    236236      the slider
     
    282282
    283283    INPUT:
    284284
    285     - ``id`` - a string; the DOM id of the slider (better be unique)
     285    - ``id`` - a string; the DOM ID of the slider (better be unique)
    286286
    287287    - ``values`` - a string; 'null' or JavaScript string containing
    288288      array of values on slider
     
    291291      the slider is done moving
    292292
    293293    - ``steps`` - an integer; number of steps from minimum to maximum
    294       value.
     294      value
    295295
    296296    - ``default_l`` - an integer (default: 0); the default position of
    297297      the left edge of the slider
     
    368368
    369369    INPUT:
    370370
    371     - ``id`` - an integer; the id of the HTML div element that this
    372       selector should have
     371    - ``id`` - an integer; the ID of the HTML div element that this
     372      selector should have.
    373373
    374374    - ``change`` - a string; JavaScript code to execute when the color
    375375      selector changes.
    376376
    377377    - ``default`` - a string (default: ``'000000'``); default color as
    378       a 6-character HTML hex string.
     378      a 6-character HTML hexadecimal string.
    379379
    380380    OUTPUT:
    381381
     
    631631
    632632        - ``globs`` - a string:object dictionary; the globals
    633633          interpreter variables, e.g., :func:`globals`, which is
    634           useful for evaling value.
     634          useful for evaluating value.
    635635
    636636        OUTPUT:
    637637
     
    701701
    702702    def cell_id(self):
    703703        """
    704         Return the id of the cell that contains this :func:`interact` control.
     704        Return the ID of the cell that contains this :func:`interact` control.
    705705
    706706        OUTPUT:
    707707
    708         - an integer - id of cell that this control interacts
     708        - an integer - ID of cell that this control interacts
    709709
    710710        EXAMPLES:
    711711
    712         The output below should equal the id of the current cell::
     712        The output below should equal the ID of the current cell::
    713713
    714714            sage: sage.server.notebook.interact.InteractControl('theta', 1).cell_id()
    715715            0
     
    824824    def value_js(self, n):
    825825        """
    826826        Return JavaScript that evaluates to value of this control.
    827         If ``n`` is 0 return code for evaluation by the actual color
     827        If ``n`` is 0, return code for evaluation by the actual color
    828828        control.  If ``n`` is 1, return code for the text area that
    829829        displays the current color.
    830830
     
    16471647
    16481648        - ``controls`` - a list of :class:`InteractControl` instances.
    16491649
    1650         - ``id`` - an integer; the id of the cell that contains this
     1650        - ``id`` - an integer; the ID of the cell that contains this
    16511651          InteractCanvas.
    16521652
    16531653        - ``options`` - any additional keyword arguments (for example,
     
    17081708
    17091709    def cell_id(self):
    17101710        r"""
    1711         Returns the cell id associated to this :class:`InteractCanvas`.
     1711        Returns the cell ID associated to this :class:`InteractCanvas`.
    17121712
    17131713        OUTPUT:
    17141714
     
    17311731
    17321732        - list of controls
    17331733
    1734         .. note:: Returns a reference to a mutable list.
     1734        .. note::
     1735
     1736            Returns a reference to a mutable list.
    17351737
    17361738        EXAMPLES::
    17371739
     
    18971899
    18981900        INPUT:
    18991901
    1900         - ``cell_id`` - an integer; the ambient cell's id
     1902        - ``cell_id`` - an integer; the ambient cell's ID
    19011903
    19021904        EXAMPLES::
    19031905
     
    20032005    (see defaults below).
    20042006
    20052007   
    2006         * ``u = input_box(default=None, label=None, type=None)`` -
    2007           input box with given ``default``; use ``type=str`` to get
    2008           input as an arbitrary string
     2008    * ``u = input_box(default=None, label=None, type=None)`` -
     2009      input box with given ``default``; use ``type=str`` to get
     2010      input as an arbitrary string
    20092011
    20102012
    2011         * ``u = slider(vmin, vmax=None, step_size=1, default=None,
    2012           label=None)`` - slider with given list of possible values;
    2013           ``vmin`` can be a list
     2013    * ``u = slider(vmin, vmax=None, step_size=1, default=None,
     2014      label=None)`` - slider with given list of possible values;
     2015      ``vmin`` can be a list
    20142016
    20152017
    2016         * ``u = range_slider(vmin, vmax=None, step_size=1,
    2017           default=None, label=None)`` - range slider with given list
    2018           of possible values; ``vmin`` can be a list
     2018    * ``u = range_slider(vmin, vmax=None, step_size=1,
     2019      default=None, label=None)`` - range slider with given list
     2020      of possible values; ``vmin`` can be a list
    20192021
    20202022
    2021         * ``u = checkbox(default=True, label=None)`` - a checkbox
     2023    * ``u = checkbox(default=True, label=None)`` - a checkbox
    20222024
    20232025
    2024         * ``u = selector(values, label=None, nrows=None, ncols=None,
    2025           buttons=False)`` - a dropdown menu or buttons (get buttons
    2026           if ``nrows``, ``ncols``, or ``buttons`` is set, otherwise a
    2027           dropdown menu)
     2026    * ``u = selector(values, label=None, nrows=None, ncols=None,
     2027      buttons=False)`` - a dropdown menu or buttons (get buttons
     2028      if ``nrows``, ``ncols``, or ``buttons`` is set, otherwise a
     2029      dropdown menu)
    20282030
    20292031
    2030         * ``u = input_grid(nrows, ncols, default=None, label=None,
    2031           to_value=lambda x:x, width=4)`` - an editable grid of
    2032           objects (a matrix or array)
     2032    * ``u = input_grid(nrows, ncols, default=None, label=None,
     2033      to_value=lambda x:x, width=4)`` - an editable grid of
     2034      objects (a matrix or array)
    20332035
    20342036
    2035         * ``u = text_control(value='')`` - a block of text
     2037    * ``u = text_control(value='')`` - a block of text
    20362038
    20372039
    20382040    You can create a color selector by setting the default value for a
     
    20452047    your function.  These are all just convenient shortcuts for
    20462048    creating the controls listed above.
    20472049   
    2048         * ``u`` - blank input_box field
     2050    * ``u`` - blank input_box field
    20492051
    2050         * ``u = element`` - input_box with ``default=element``, if
    2051           element not below.
     2052    * ``u = element`` - input_box with ``default=element``, if
     2053      element not below.
    20522054
    2053         * ``u = (umin,umax)`` - continuous slider (really `100` steps)
     2055    * ``u = (umin,umax)`` - continuous slider (really `100` steps)
    20542056
    2055         * ``u = (umin,umax,du)`` - slider with step size ``du``
     2057    * ``u = (umin,umax,du)`` - slider with step size ``du``
    20562058
    2057         * ``u = list`` - buttons if ``len(list)`` at most `5`;
    2058           otherwise, drop down
     2059    * ``u = list`` - buttons if ``len(list)`` at most `5`;
     2060      otherwise, drop down
    20592061
    2060         * ``u = generator`` - a slider (up to `10000` steps)
     2062    * ``u = generator`` - a slider (up to `10000` steps)
    20612063
    2062         * ``u = bool`` - a checkbox
     2064    * ``u = bool`` - a checkbox
    20632065
    2064         * ``u = Color('blue')`` - a 2D RGB color selector; returns
    2065           ``Color`` object
     2066    * ``u = Color('blue')`` - a 2-D RGB color selector; returns
     2067      ``Color`` object
    20662068
    2067         * ``u = (default, v)`` - ``v`` as above, with given
    2068           ``default`` value
     2069    * ``u = (default, v)`` - ``v`` as above, with given
     2070      ``default`` value
    20692071
    2070         * ``u = (label, v)`` - ``v`` as above, with given ``label``
    2071           (a string)
     2072    * ``u = (label, v)`` - ``v`` as above, with given ``label``
     2073      (a string)
    20722074
    2073         * ``u = matrix`` - an ``input_grid`` with ``to_value`` set to
    2074           ``matrix.parent()`` and default values given by the matrix
     2075    * ``u = matrix`` - an ``input_grid`` with ``to_value`` set to
     2076      ``matrix.parent()`` and default values given by the matrix
    20752077
    20762078    .. note::
    20772079
    2078         Suppose you would like to make a interactive with a default
     2080        Suppose you would like to make an interactive with a default
    20792081        RGB color of ``(1,0,0)``, so the function would have signature
    20802082        ``f(color=(1,0,0))``.  Unfortunately, the above shortcuts
    20812083        reinterpret the ``(1,0,0)`` as a discrete slider with step
     
    21652167        ...       show(L)
    21662168        <html>...
    21672169
    2168     You can rotate and zoom into 3D graphics while interacting with a
     2170    You can rotate and zoom into 3-D graphics while interacting with a
    21692171    variable::
    21702172
    21712173        sage: @interact
     
    21832185        ...     show(G, figsize=5, xmin=0, ymin=0)
    21842186        <html>...
    21852187
    2186     Two "sinks" displayed simultaneously via a contour plot and a 3D
     2188    Two "sinks" displayed simultaneously via a contour plot and a 3-D
    21872189    interactive plot::
    21882190
    21892191        sage: @interact
     
    27292731        - ``display_value`` - a bool, whether to display the current
    27302732          value to the right of the slider
    27312733
    2732         EXAMPLES::
     2734        EXAMPLES:
    27332735
    27342736        We specify both ``vmin`` and ``vmax``.  We make the default
    27352737        `3`, but since `3` isn't one of `3/17`-th spaced values
     
    28502852        - ``display_value`` - a bool, whether to display the current
    28512853          value below the slider
    28522854
    2853         EXAMPLES::
     2855        EXAMPLES:
    28542856
    28552857        We specify both ``vmin`` and ``vmax``.  We make the default
    28562858        `(3,4)` but since neither is one of `3/17`-th spaced
     
    32903292   
    32913293    INPUT:
    32923294
    3293     - ``cell_id`` - an integer; the id of an :func:`interact` cell
     3295    - ``cell_id`` - an integer; the ID of an :func:`interact` cell
    32943296
    32953297    - ``var`` - an object; a variable associated to that cell
    32963298
  • sage/server/notebook/notebook.py

    diff -r 05a268f0db84 -r 5b9a551e7b63 sage/server/notebook/notebook.py
    a b  
    161161        """
    162162        try:
    163163            dir = self.__absdir
    164         except AttributeErrro:
     164        except AttributeError:
    165165            dir = self.__dir
    166166        import shutil
    167167        # We ignore_errors because in rare parallel doctesting
     
    330330
    331331    def user_is_admin(self, user):
    332332        """
    333         Return true if ``user`` is an admin.
     333        Return True if ``user`` is an admin.
    334334
    335335        INPUT:
    336336
     
    354354
    355355    def user_is_guest(self, username):
    356356        """
    357         Return true if ``username`` is a guest.
     357        Return True if ``username`` is a guest.
    358358
    359359        INPUT:
    360360
     
    830830
    831831        - a list of strings.
    832832       
    833         EXAMPLES: We make a new notebook with two users and two worksheets,
     833        EXAMPLES:
     834
     835        We make a new notebook with two users and two worksheets,
    834836        then list their names::
    835837       
    836838            sage: nb = sage.server.notebook.notebook.Notebook(tmp_dir())
     
    10611063       
    10621064        -  ``worksheet`` - a newly created Worksheet instance
    10631065       
    1064         EXAMPLES: We create a notebook and import a plain text worksheet
     1066        EXAMPLES:
     1067
     1068        We create a notebook and import a plain text worksheet
    10651069        into it.
    10661070       
    10671071        ::
     
    11081112
    11091113        -  a new instance of Worksheet
    11101114       
    1111         EXAMPLES: We write a plain text worksheet to a file and import it
     1115        EXAMPLES:
     1116
     1117        We write a plain text worksheet to a file and import it
    11121118        using this function.
    11131119       
    11141120        ::
  • sage/server/notebook/template.py

    diff -r 05a268f0db84 -r 5b9a551e7b63 sage/server/notebook/template.py
    a b  
    44
    55AUTHORS:
    66
    7     - Bobby Moretti (2007-07-18): initial version
     7- Bobby Moretti (2007-07-18): initial version
    88
    9     - Timothy Clemans and Mike Hansen (2008-10-27): major update
    10 
     9- Timothy Clemans and Mike Hansen (2008-10-27): major update
    1110"""
    1211#############################################################################
    1312#       Copyright (C) 2007 William Stein <wstein@gmail.com>
     
    6261    INPUT:
    6362
    6463    - ``filename`` - a string; the filename of the template relative
    65       to $SAGE_ROOT/devel/sage/sage/server/notebook/templates
     64      to ``SAGE_ROOT/devel/sage/sage/server/notebook/templates``
    6665
    6766    - ``user_context`` - a dictionary; the context in which to evaluate
    6867      the file's template variables
  • sage/server/notebook/worksheet.py

    diff -r 05a268f0db84 -r 5b9a551e7b63 sage/server/notebook/worksheet.py
    a b  
    99worksheet, spawning Sage processes that do all of the actual work
    1010and are controlled via pexpect, and reporting on results of
    1111calculations. The state of the cells in a worksheet is stored on
    12 the filesystem (not in the notebook pickle sobj).
     12the file system (not in the notebook pickle sobj).
    1313
    1414AUTHORS:
    1515
     
    293293       
    294294       
    295295        -  ``-1,0,1`` - comparison is on the underlying
    296            filenames.
     296           file names.
    297297       
    298298       
    299299        EXAMPLES::
     
    738738
    739739    def attached_data_files(self):
    740740        """
    741         Return a list of the filenames of files in the worksheet data
     741        Return a list of the file names of files in the worksheet data
    742742        directory.
    743743       
    744744        OUTPUT: list of strings
     
    842842        INPUT:
    843843       
    844844       
    845         -  ``sysem`` - string (default: 'sage')
     845        -  ``system`` - string (default: 'sage')
    846846       
    847847       
    848848        EXAMPLES::
     
    896896
    897897           The reason the input is a string and lower case instead of
    898898           a Python bool is because this gets called indirectly from
    899            javascript. (And, Jason Grout wrote this and didn't realize
     899           JavaScript. (And, Jason Grout wrote this and didn't realize
    900900           how unpythonic this design is - it should be redone to use
    901901           True/False.)
    902902       
     
    11431143       
    11441144        -  ``comment`` - string
    11451145       
    1146         -  ``usename`` - string
     1146        -  ``username`` - string
    11471147       
    11481148       
    11491149        EXAMPLES: We create a worksheet and rate it, then look at the
     
    12631263
    12641264    def rating(self):
    12651265        """
    1266         Return overall aerage rating of self.
     1266        Return overall average rating of self.
    12671267       
    12681268        OUTPUT: float or the int -1 to mean "not rated"
    12691269       
     
    19301930    def limit_snapshots(self):
    19311931        r"""
    19321932        This routine will limit the number of snapshots of a worksheet, 
    1933         as specified by a hard-cioded value below.
     1933        as specified by a hard-coded value below.
    19341934
    19351935        Prior behavior was to allow unlimited numbers of snapshots and
    19361936        so this routine will not delete files created prior to this change.
     
    20972097        -  ``text`` - a string
    20982098       
    20992099        -  ``ignore_ids`` - bool (default: False); if True
    2100            ignore all the id's in the {{{}}} code block.
     2100           ignore all the IDs in the {{{}}} code block.
    21012101       
    21022102       
    21032103        EXAMPLES: We create a new test notebook and a worksheet.
     
    22142214             confirm_before_leave=False, read_only=False):
    22152215        r"""
    22162216        INPUT:
    2217 
    22182217       
    22192218        - publish - a boolean stating whether the worksheet is published
    22202219       
    22212220        - do_print - a boolean
    22222221
    22232222        OUTPUT:
    2224 
    2225        
    2226         - string -- the html for the worksheet
     2223       
     2224        - string -- the HTML for the worksheet
    22272225       
    22282226        EXAMPLES::
    22292227       
     
    22812279        r"""
    22822280        OUTPUT:
    22832281       
    2284         - string -- the html for the save, discard, etc. buttons
     2282        - string -- the HTML for the save, discard, etc. buttons
    22852283
    22862284        EXAMPLES::
    22872285
     
    22952293    def html_share_publish_buttons(self, select=None, backwards=False):
    22962294        r"""
    22972295        INPUT:
    2298 
    22992296       
    23002297        - select - a boolean
    23012298       
    23022299        - backwards - a boolean
    23032300
    23042301        OUTPUT:
    2305 
    2306        
    2307         - string -- the html for the share, publish, etc. buttons
     2302       
     2303        - string -- the HTML for the share, publish, etc. buttons
    23082304
    23092305        EXAMPLES::
    23102306
     
    23242320        r"""
    23252321        OUTPUT:
    23262322       
    2327         - string -- the html for the menus of the worksheet
     2323        - string -- the HTML for the menus of the worksheet
    23282324
    23292325        EXAMPLES::
    23302326       
     
    23442340    def html_worksheet_body(self, do_print, publish=False):
    23452341        r"""
    23462342        INPUT:
    2347 
    23482343       
    23492344        - publish - a boolean stating whether the worksheet is published
    23502345       
    23512346        - do_print - a boolean
    23522347
    23532348        OUTPUT:
    2354 
    2355        
    2356         - string -- the html for the File menu of the worksheet
     2349       
     2350        - string -- the HTML for the File menu of the worksheet
    23572351
    23582352        EXAMPLES::
    23592353       
     
    24192413       
    24202414        INPUT:
    24212415       
    2422        
    24232416        -  ``username`` - user who would like to edit this
    24242417           file.
    24252418       
     
    31623155        -  ``C`` - a Cell
    31633156       
    31643157        -  ``username`` - the name of the user that is
    3165            evaluating this cell (mainly used for loging)
     3158           evaluating this cell (mainly used for login)
    31663159       
    31673160       
    31683161        .. note::
  • sage/server/support.py

    diff -r 05a268f0db84 -r 5b9a551e7b63 sage/server/support.py
    a b  
    243243
    244244def source_code(s, globs, system='sage'):
    245245    r"""
    246     Format an object's source code to process and display in the the
     246    Format an object's source code to process and display in the
    247247    Sage notebook.
    248248   
    249249    INPUT: