Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
share
/
rhsm
/
subscription_manager
/
Upload File :
New :
File
Dir
//usr/share/rhsm/subscription_manager/printing_utils.pyc
mò x^Sc @ si d k Z d k l Z d k l Z e i Z d „ Z d „ Z d „ Z d „ Z d „ Z d d „ Z d S( N( s utf8_width( s get_terminal_widthc C s | d | t | ƒ S( Nt ( t in_strt paddingt utf8_width( R R ( ( t6 /usr/share/rhsm/subscription_manager/printing_utils.pyt ljust_wide s c O së | i d d ƒ } g } | D] } | d | | q ~ } t t t t | ƒ ƒ d d t t ƒ d ƒ ƒ } g } xd | D]\ } t | | | d ƒ i d ƒ } t | d | ƒ d | d <d i | ƒ } | i | ƒ q{ Wt | | ƒ } t ƒ } g } xâ | D]Ú \ } } t | t ƒ o– | ou t | d | | ƒ } | i | | | ƒ ƒ x\ | d D]6 } t | | | ƒ } | i | d | d | ƒ ƒ qZWqÚ| i | | d ƒ ƒ q t | | | ƒ } | i | | | ƒ ƒ q Wd i | ƒ S( s² Take a list of captions and values and columnize the output so that shorter captions are padded to be the same length as the longest caption. For example: Foo: Bar Something Else: Baz This function also takes a callback which is used to render the final line. The callback gives us the ability to do things like replacing None values with the string "None" (see _none_wrap()). t indenti R iÿÿÿÿi i s s %st N( t kwargst getR t _[1]t caption_listt captiont mint sortedt mapR t intt get_terminal_widthR t padded_listt format_namet splitt linesR t joint fixed_captiont appendt zipt argst columnst outputt valuet isinstancet listt formatted_argt callbackt val( R R! R R R R R R R R R R"