Package qubx :: Module notebook :: Class NbItem
[hide private]
[frames] | no frames]

Class NbItem

source code

     object --+    
              |    
util_types.Anon --+
                  |
                 NbItem
Known Subclasses:

The simplest type of notebook item; this class has the minimal properties and methods to implement the notebook protocol:

    mnu_caption: text for the notebook menu, e.g. "Chart"
    global_name: How to find this item from the global namespace, e.g. QubX.AmpHist.plots[0].nbChart
                 (for script recording)
    to_txt: function() -> string, returns plain-text representation of this item

Subclasses may present additional information, e.g. pictures or data series, but should
also provide to_txt for compatibility with console output.

Instance Methods [hide private]
 
__init__(self, mnu_caption, global_name, to_txt, *args, **kw)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
str(x)
source code

Inherited from util_types.Anon: __getattr__, __repr__, clone

Inherited from util_types.Anon (private): _find_arg_dicts, _str_indent

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, mnu_caption, global_name, to_txt, *args, **kw)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)