/usr/lib/python2.6/site-packages/cliff
Edit: /usr/lib/python2.6/site-packages/cliff/display.pyc (4199B)
Ñò
yDVc
@ sÄ d Z d d k Z y d d k l Z Wn, e j
o d d k l Z d „ Z n Xd d k Z d d k Z d d k Z d d k l
Z
e i e ƒ Z
e i e i ƒ d e
f d „ ƒ Yƒ Z d S(
s, Application base class for displaying data.
iÿÿÿÿN( t compress( t izipc C s d „ t | | ƒ Dƒ S( Nc s s* x# | ] \ } } | o | Vq q Wd S( N( ( t .0t dt s( ( s, /tmp/pip-build-lt8jXN/cliff/cliff/display.pys
s ( R ( t datat selectors( ( s, /tmp/pip-build-lt8jXN/cliff/cliff/display.pyR s i ( t Commandt DisplayCommandBasec B sz e Z d Z d d „ Z e i d „ ƒ Z e i d „ ƒ Z d „ Z d „ Z
e i d „ ƒ Z d „ Z
e d „ ƒ Z RS(
sB Command base class for displaying data about a single object.
c C s2 t t | ƒ i | | d | ƒ| i ƒ | _ d S( Nt cmd_name( t superR t __init__t _load_formatter_pluginst _formatter_plugins( t selft appt app_argsR ( ( s, /tmp/pip-build-lt8jXN/cliff/cliff/display.pyR s c C s d S( sE String specifying the namespace to use for loading formatter plugins.N( ( R ( ( s, /tmp/pip-build-lt8jXN/cliff/cliff/display.pyt formatter_namespace# s c C s d S( s4 String specifying the name of the default formatter.N( ( R ( ( s, /tmp/pip-build-lt8jXN/cliff/cliff/display.pyt formatter_default' s c C s t i | i d t ƒS( Nt invoke_on_load( t stevedoret ExtensionManagerR t True( R ( ( s, /tmp/pip-build-lt8jXN/cliff/cliff/display.pyR + s c C sñ t t | ƒ i | ƒ } | i d d d d ƒ } t | i i ƒ ƒ } | i } | | j o | d } n | i d d d d d
d d | d
| d d | ƒ| i d d d
d d
g d d d d d d ƒx! | i D] } | i i | ƒ qÓ W| S( Nt titles output formatterst descriptions output formatter optionsi s -fs --formatt destt formattert actiont storet choicest defaultt helps! the output format, defaults to %ss -cs --columnt appendt columnst metavart COLUMNs1 specify the column(s) to include, can be repeated(
R
R t
get_parsert add_argument_groupt sortedR
t namesR t add_argumentt obj( R t prog_namet parsert formatter_groupt formatter_choicesR R ( ( s, /tmp/pip-build-lt8jXN/cliff/cliff/display.pyR$ 2 s4
c C s d S( s5 Use the formatter to generate the output.
:param parsed_args: argparse.Namespace instance with argument values
:param column_names: sequence of strings containing names
of output columns
:param data: iterable with values matching the column names
N( ( R t parsed_argst column_namesR ( ( s, /tmp/pip-build-lt8jXN/cliff/cliff/display.pyt produce_outputP s c C sB | i | i i | _ | i | ƒ \ } } | i | | | ƒ d S( Ni ( R
R R) t take_actionR0 ( R R. R/ R ( ( s, /tmp/pip-build-lt8jXN/cliff/cliff/display.pyt runZ s c C s
t | | ƒ S( N( R ( t iterableR ( ( s, /tmp/pip-build-lt8jXN/cliff/cliff/display.pyt _compress_iterable` s N( t __name__t
__module__t __doc__t NoneR t abct abstractpropertyR R R R$ t abstractmethodR0 R2 t staticmethodR4 ( ( ( s, /tmp/pip-build-lt8jXN/cliff/cliff/display.pyR s
( R7 R9 t itertoolsR t ImportErrorR t loggingt sixR t commandR t getLoggerR5 t LOGt
add_metaclasst ABCMetaR ( ( ( s, /tmp/pip-build-lt8jXN/cliff/cliff/display.pyt s