grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a BjŒjØ€ã@spddlmZmZddlmZmZddlmZmZddl m Z m Z m Z m Z mZddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZddlmZm Z ddl!m"Z"ddl#m$Z$Gd d „d eƒZ%Gd d „d e$eƒZ&Gd d„deƒZ'dd„Z(Gdd„de)ƒZ*Gdd„dee'eƒƒZ+dd„Z,Gdd„deƒZ-dd„Z.Gdd„deƒZ/Gdd„deƒZ0dd „Z1e2d!k�rle1ƒd"S)#é)ÚdivisionÚprint_function)Úord2Úwith_metaclass)Údecompose_tagmarkupÚget_encoding_mode)ÚCompositeCanvasÚ CanvasJoinÚ TextCanvasÚ CanvasCombineÚ SolidCanvas)Ú WidgetMetaÚWidgetÚBOXÚFIXEDÚFLOWÚnocache_widget_renderÚnocache_widget_render_instanceÚ fixed_sizeÚ WidgetWrapÚDividerÚ SolidFillÚTextÚCENTERÚCLIP)ÚPileÚColumns)ÚAttrSpec)ÚWidgetDecorationc@sJeZdZeegƒZdd„Zdd„Zdd„Zdd„Z dd d „Z dd d„Z d S)ÚBigTextcCs| |¡| |¡dS)z_ markup -- same as Text widget markup font -- instance of a Font class N)Úset_fontÚset_text)ÚselfÚmarkupÚfont©r%ú4/usr/lib64/python3.9/site-packages/urwid/graphics.pyÚ__init__'s zBigText.__init__cCst|ƒ\|_|_| ¡dS©N)rÚtextÚattribÚ _invalidate)r"r#r%r%r&r!/szBigText.set_textcCs |j|jfS)z- Returns (text, attributes). )r)r*©r"r%r%r&Úget_text3szBigText.get_textcCs||_| ¡dSr()r$r+)r"r$r%r%r&r 9szBigText.set_fontNFcCs0|jj}d}|jD]}||j |¡7}q||fS©Nr)r$Úheightr)Ú char_width)r"ÚsizeÚfocusÚrowsÚcolsÚcr%r%r&Úpack=s  z BigText.packc Csät|ƒd}d}}g}|jj}|jdt|jƒfg}|jD]n} |sX||\}}|d7}|d8}|j | ¡} | srq<|j | ¡} |dur˜t| ƒ} |   |¡|  | dd| f¡q<|rºt |ƒ} nt dg|ddd�} t| ƒ} |   g¡| S)NréFÚ)ÚmaxcolZ check_width)rr$r/r*Úlenr)r0ÚrenderrZ fill_attrÚappendr r Z set_depends) r"r1r2ÚaZaiZakÚor3r*ÚchÚwidthr5Úcanvr%r%r&r;Ds6       ÿ zBigText.render)NF)F) Ú__name__Ú __module__Ú __qualname__Ú frozensetrÚ_sizingr'r!r-r r6r;r%r%r%r&r$s  rc @s0eZdZdd d „Zd d „Zdd„Zddd„ZdS)ÚLineBoxr8ÚcenterNõ┌õ─õ│õâ”�õâ””õ┘c Cs |r t|ƒ}| rt| ƒ} |r$t|ƒ}| r0t| ƒ} t|ƒt|ƒ}}t| ƒt| ƒ} } |sd|rdtdƒ‚|r~t|| |¡fƒ|_nt| |¡ƒ|_|�r|dvr¤tdƒ‚|dkr¼d|jf|g} n |d|jfg} |dkrÜ|  |¡t| ƒ|_tdd|f|jdd|fgƒ}n d |_d }g}|�r*| dd|f¡n| dd td ƒf¡| |¡t |ƒd}| �rj| dd| f¡t|d d g|d �}| �ržtdd| f| dd| fgƒ}nd }g}|�rº| d|f¡| |¡t |ƒd}|�rä| d|f¡t ||d�}t   ||¡t   ||¡d S)af Draw a line around original_widget. Use 'title' to set an initial title text with will be centered on top of the box. Use `title_attr` to apply a specific attribute to the title text. Use `title_align` to align the title to the 'left', 'right', or 'center'. The default is 'center'. You can also override the widgets used for the lines/corners: tline: top line bline: bottom line lline: left line rline: right line tlcorner: top left corner trcorner: top right corner blcorner: bottom left corner brcorner: bottom right corner If empty string is specified for one of the lines/corners, then no character will be output there. This allows for seamless use of adjoining LineBoxes. z.Cannot have a title when tline is empty string)ÚleftrHÚrightz7title_align must be one of "left", "right", or "center"rOZflowrHÚfixedr7Nrr8é)Z box_columnsZ focus_column)Z focus_item)rrrÚ ValueErrorÚ format_titleÚ title_widgetr<rÚ tline_widgetr:rrr'r)r"Zoriginal_widgetÚtitleZ title_alignZ title_attrZtlcornerZtlineZllineZtrcornerZblcornerZrlineZblineZbrcornerZ tline_widgetsÚtopZmiddle_widgetsZ focus_colZmiddleZbottomZ pile_widgetsZ focus_posZpiler%r%r&r'esr  ý  ÿÿ    zLineBox.__init__cCst|ƒdkrd|SdSdS)Nrz %s r8)r:©r"r)r%r%r&rTÍs zLineBox.format_titlecCs.|jstdƒ‚|j | |¡¡|j ¡dS)Nz$Cannot set title when tline is unset)rUrSr!rTrVr+rYr%r%r&Ú set_titleÓszLineBox.set_titleFcCs6t|j ||¡ƒ}|dd7<|dd7<|S)aY Return the number of screen columns and rows required for this Linebox widget to be displayed without wrapping or clipping, as a single element tuple. :param size: ``None`` for unlimited screen columns or (*maxcol*,) to specify a maximum column size :type size: widget size rrRr7)ÚlistZ_original_widgetr6©r"r1r2r%r%r&r6Ùs z LineBox.pack) r8rHNrIrJrKrLrMrKrJrN)NF)rBrCrDr'rTrZr6r%r%r%r&rGcsü hrGcs eZdZdZ‡fdd„Z‡ZS)Ú BarGraphMetazó Detect subclass get_data() method and dynamic change to get_data() method and disable caching in these cases. This is for backwards compatibility only, new programs should use set_data() instead of overriding get_data(). csBtt|ƒ |||¡d|vr.t|ƒ|_|j|_tdd„tƒ|_dS)NÚget_datacSs|jSr()Ú _get_datar,r%r%r&Úøóz'BarGraphMeta.__init__..) Úsuperr]r'rr;r^r_ÚpropertyÚnocache_bargraph_get_data)ÚclsÚnameÚbasesÚd©Ú __class__r%r&r'ñs þzBarGraphMeta.__init__)rBrCrDÚ__doc__r'Ú __classcell__r%r%rir&r]ésr]cCst|ƒ|_||_dS)zm Disable caching on this bargraph because get_data_fn needs to be polled to get the latest data. N)rr;r_)r"Z get_data_fnr%r%r&rdüs rdc@s eZdZdS)Ú BarGraphErrorN)rBrCrDr%r%r%r&rmsrmc@sŠeZdZeegƒZdZdZdZddd„Z ddd„Z d d d „Z d d „Z d d„Z dd„Zdd„Zdd„Zdd„Zdd„Zdd„Zd!dd„ZdS)"ÚBarGraphTu â–�▂▃▄▅▆▇u_⎺⎻─⎼⎽NcCs*| |||¡| gdd¡| d¡dS)z• Create a bar graph with the passed display characteristics. see set_segment_attributes for a description of the parameters. r7N)Úset_segment_attributesÚset_dataÚ set_bar_width)r"ÚattlistÚhattÚsattr%r%r&r'szBarGraph.__init__c Cs‚g|_g|_t|ƒdkr&td|fƒ‚t|ƒdks:Jdƒ‚|D]J}t|ƒtkrh|j |¡|j d¡q>|\}}|j |¡|j |¡q>g|_|dur¦|jdg}nt|ƒtkr¸|g}||_|durÊi}|  ¡D]¤}z|\\}} }Wn"t �ytd|fƒ‚Yn0t|ƒt k�s&|t|ƒk�r4td|fƒ‚t| ƒt k�sP| t|ƒk�r^td |fƒ‚|| krÒtd || fƒ‚qÒ||_ dS) a :param attlist: list containing display attribute or (display attribute, character) tuple for background, first segment, and optionally following segments. ie. len(attlist) == num segments+1 character defaults to ' ' if not specified. :param hatt: list containing attributes for horizontal lines. First element is for lines on background, second is for lines on first segment, third is for lines on second segment etc. :param satt: dictionary containing attributes for smoothed transitions of bars in UTF-8 display mode. The values are in the form: (fg,bg) : attr fg and bg are integers where 0 is the graph background, 1 is the first segment, 2 is the second, ... fg > bg in all values. attr is an attribute with a foreground corresponding to fg and a background corresponding to bg. If satt is not None and the bar graph is being displayed in a terminal using the UTF-8 encoding then the character cell that is shared between the segments specified will be smoothed with using the UTF-8 vertical eighth characters. eg: set_segment_attributes( ['no', ('unsure',"?"), 'yes'] ) will use the attribute 'no' for the background (the area from the top of the graph to the top of the bar), question marks with the attribute 'unsure' will be used for the topmost segment of the bar, and the attribute 'yes' will be used for the bottom segment of the bar. rRz5attlist must include at least background and seg1: %rz must at least specify bg and fg!ú Nrz!satt not in (fg,bg:attr) form: %rzfg not valid integer: %rzbg not valid integer: %rzfg (%s) not > bg (%s)) ÚattrÚcharr:rmÚtypeÚtupler<rsr[ÚitemsrSÚintrt) r"rrrsrtr=rvr?ÚiÚfgÚbgr%r%r&ros@#      zBarGraph.set_segment_attributescCs<|dur$|dd…}| ¡| ¡|||f|_| ¡dS)aü Store bar data, bargraph top and horizontal line positions. bardata -- a list of bar values. top -- maximum value for segments within bardata hlines -- None or a bar value marking horizontal line positions bar values are [ segment1, segment2, ... ] lists where top is the maximal value corresponding to the top of the bar graph and segment1, segment2, ... are the values for the top of each segment of this bar. Simple bar graphs will only have one segment in each bar value. Eg: if top is 100 and there is a bar value of [ 80, 30 ] then the top of this bar will be at 80% of full height of the graph and it will have a second segment that starts at 30%. N)ÚsortÚreverseÚdatar+)r"ÚbardatarXÚhlinesr%r%r&rp`s   zBarGraph.set_datacCsT|\}}|j\}}}| ||f|¡}t|ƒt|ƒkrJ|dt|ƒ…||fS|||fS)a/ Return (bardata, top, hlines) This function is called by render to retrieve the data for the graph. It may be overloaded to create a dynamic bar graph. This implementation will truncate the bardata list returned if not all bars will fit within maxcol. N)r�Úcalculate_bar_widthsr:)r"r1r9Úmaxrowr‚rXrƒÚwidthsr%r%r&r_ys  zBarGraph._get_datacCs&|dus|dksJ‚||_| ¡dS)z’ Set a preferred bar width for calculate_bar_widths to use. width -- width of bar or None for automatic width adjustment Nr)Ú bar_widthr+)r"r@r%r%r&rqŒszBarGraph.set_bar_widthc Cs�|\}}|jdur.|jgtt|ƒ||jƒSt|ƒ|krDdg|Sg}|}t|ƒ}|D]2}tt|ƒ|dƒ} | | ¡|| 8}|d8}qX|S)zÍ Return a list of bar widths, one for each bar in data. If self.bar_width is None this implementation will stretch the bars across the available space specified by maxcol. Nr7çà?)r‡Úminr:r{Úfloatr<) r"r1r‚r9r…r†ZgrowZremainÚrowÚwr%r%r&r„–s  ÿ    zBarGraph.calculate_bar_widthscCsdS©z Return False. Fr%r,r%r%r&Ú selectable°szBarGraph.selectablecCs|jotƒdkS)NÚutf8)rtrr,r%r%r&Ú use_smoothed¶szBarGraph.use_smoothedc Csx|\}}| ||f¡\}}}| ||f|¡}| ¡rRt||||dƒ}| |¡}nt||||ƒ}|rt| ||||¡}|S)z) Calculate display data. é)r^r„r�Úcalculate_bargraph_displayÚsmooth_displayÚhlines_display) r"r1r9r…r‚rXrƒr†Údispr%r%r&Úcalculate_display¹sÿ ÿzBarGraph.calculate_displaycs�ˆ ¡rd}gd¢}n d}dg}g}|D]0}t||ƒ|||} | dkrNq(| | ¡q(g} d} |D]J} t| ƒ} | | kr|qf| | } |D]"\}}| |krˆ|  | |f¡q¬qˆ| } qf‡fdd„}g}d}d}|D]¼\}}|t| ƒkrò| ||f¡qÎ||}|t| ƒk�rl| |d|k�rl| |\} }| |dk�rF| | ||f¡| d|||ƒf¡| d}|d7}qú||krÎ| |||f¡|}qÎ|S) a+ Add hlines to display structure represented as bar_type tuple values: (bg, 0-5) bg is the segment that has the hline on it 0-5 is the hline graphic to use where 0 is a regular underscore and 1-5 are the UTF-8 horizontal scan line characters. r))gš™™™™™É?r7)gš™™™™™Ù?rR)g333333ã?é)gš™™™™™é?é)çð?érˆ)r™réÿÿÿÿcsRg}|D]D\}}t|ƒtkr>tˆjƒ|kr>| ||f|f¡q| ||f¡q|Sr()rxr{r:rsr<)r‹ÚchnumZroutÚbar_typer@r,r%r&Úfill_rowús   ÿz)BarGraph.hlines_display..fill_rowr7)r�rŠr<r{r:)r"r•rXrƒr…ZshiftrÚrZrhlÚhZrhZhrowsZlast_ir|ÚfZsplrœržr>ÚkZrnumÚy_countr‹Z end_blockr%r,r&r”ÏsV          zBarGraph.hlines_displaycsÄg‰d‰‡‡fdd„‰‡‡fdd„}|D]Œ\}}ˆrjtdˆ|ƒ}|||ƒ||8}ˆ|7‰ˆd‰|sjq(ˆdksvJ‚|dkr¢ˆ |dd|f¡|d}|s¢q(ˆ ||f¡|‰q(dd „ˆDƒS) a0 smooth (col, row*8) display into (col, row) display using UTF vertical eighth characters represented as bar_type tuple values: ( fg, bg, 1-7 ) where fg is the lower segment, bg is the upper segment and 1-7 is the vertical eighth character to use. rc sÐ||\}}\}}||f||fkr0||fddfSt||ƒ}d}}||krX|||f}n||krl|||f}t|ƒtkr†||f||fS||fˆjvr¸ˆdkrª||f||fS||f||fS||dˆf|f||fS)Nr˜r‘)r‰rxryrt) r=ÚbZbt1Zw1Zbt2Zw2ZwminÚl1Úl2)rŸr"r%r&Ú seg_combine&s    z,BarGraph.smooth_display..seg_combinec sˆd\}}|dd…}|dd…}g}|r¦ˆ| d¡| d¡ƒ\\}}}}|rz|dd|krz||dd|f|d<n| ||f¡|r–|g|}|r(|g|}q(|r®J‚|||fˆd<dS)Nr›rr7)Úpopr<) Úcountr‹Zo_countZo_rowÚlZbtrŒr¥r¦)r>r§r%r&Úrow_combine_last8s"   ÿ  z1BarGraph.smooth_display..row_combine_lastr‘écSsg|]\}}|d|f‘qS)r‘r%)Ú.0Úyr‹r%r%r&Ú _raz+BarGraph.smooth_display..)r‰r<)r"r•r«r£r‹r©r%)r>rŸr§r"r&r“s,    zBarGraph.smooth_displayFcCs|\}}| ||f¡}g}|D]Ú\}}g} |D]�\} } t| ƒtkr˜t| ƒdkrv| \} } }|j| | f}|j|| }q°| \} }|j| }|j|| }n|j| }|j | | }|   ||f¡q.t | ƒ  |f¡}|  ¡dksäJdƒ‚||ddfg|7}qt|ƒ}|S)z" Render BarGraph. r—r7zInvalid characters in BarGraph!NF)r–rxryr:rtÚeighthsrsrƒrvrwr<rr;r3r )r"r1r2r9r…r•Ú combinelistr£r‹rªr�r@r}r~r¢r=Útr5rAr%r%r&r;as,       zBarGraph.render)NN)NN)N)F)rBrCrDrErrFZ ignore_focusr°rƒr'rorpr_rqr„rŽr�r–r”r“r;r%r%r%r&rns   G  KGrncCsòt|ƒt|ƒksJ‚t|ƒ}dg|}|fdd„}d}d}|D]Œ} ||} | dkrTq>|} t| ||ƒ} tt| ƒdddƒD]@} | | }||krŽqx|dkršd}|| krx|} || d||| ƒqx|| 7}|d7}q>g}d}d|fg}|D�]ô}|durú|d}qâ|�r| ||f¡d}d}||\}}d}g}|D�]n\}}}|||k�rv| ||f¡|d7}||7}||\}}�q:||k�r”| |||f¡n2||dk�r´| |||f¡| |||f¡||k�rÞt|ƒ}�q |||k�r |d7}||7}||\}}�qÞ||k�r*|||}|}�q.|d\}}||||7}||f|d<|d7}||7}||k�rr�q |t|ƒk�s�Jt||fƒƒ‚||\}}�q.|t|ƒk�rÌ|||fg||dd…7}|}|d7}qâ|�rî| ||f¡|S)a˜ Calculate a rendering of the bar graph described by data, bar_widths and height. bardata -- bar information with same structure as BarGraph.data top -- maximal value for bardata segments bar_widths -- list of integer column widths for each bar maxrow -- rows for display of bargraph Returns a structure as follows: [ ( y_count, [ ( bar_type, width), ... ] ), ... ] The outer tuples represent a set of identical rows. y_count is the number of rows in this set, the list contains the data to be displayed in the row repeated through the set. The inner tuple describes a run of width characters of bar_type. bar_type is an integer starting from 0 for the background, 1 for the 1st segment, 2 for the 2nd segment etc.. This function should complete in approximately O(n+m) time, where n is the number of bars displayed and m is the number of rows. NcSs¦||rv||d\}}}||krJ||kr6||d=qt|||f||d<qŠ||krŠ||krŠ||||f||d<dSn||durŠg||<|| ||||f¡dS)Nr›)r<)Úseg_numÚcolr‹r@r3Zlast_segZlast_colZlast_endr%r%r&Ú add_segment£s  ÿÿ  z/calculate_bargraph_display..add_segmentrr7r›)r:ÚsumÚscale_bar_valuesÚranger<Úrepr)r‚rXZ bar_widthsr…r9r3rµr´ZbarnumÚbarr@ZtallestÚsegmentsr¢ÚsZrowsetsr£ÚlastrŸr|ZlaZlnr5r>r³ÚstartÚendZoaZonr%r%r&r’ƒs–               r’c@s8eZdZeegƒZdd„Zdd„Zdd„Zd dd „Z d S) Ú GraphVScalecCs| ||¡dS)a] GraphVScale( [(label1 position, label1 markup),...], top ) label position -- 0 < position < top for the y position label markup -- text markup for this label top -- top y position This widget is a vertical scale for the BarGraph widget that can correspond to the BarGraph's horizontal lines N)Ú set_scale)r"ÚlabelsrXr%r%r&r's zGraphVScale.__init__cCs\|dd…}| ¡| ¡g|_g|_|D]$\}}|j |¡|j t|ƒ¡q,||_dS)zÛ set_scale( [(label1 position, label1 markup),...], top ) label position -- 0 < position < top for the y position label markup -- text markup for this label top -- top y position N)rr€ÚposÚtxtr<rrX)r"rÂrXr®r#r%r%r&rÁ!s   zGraphVScale.set_scalecCsdSr�r%r,r%r%r&rŽ3szGraphVScale.selectableFc CsÜ|\}}t|j|j|ƒ}g}d}t||jƒD]r\}} |d8}||krHq ||krRq,|  |f¡} ||kr‚||} t| ƒ} |  | d¡||  ¡7}|  | ddf¡q,|s¸t d|d|dƒSt |ƒ} ||rØ|  d||¡| S)z% Render GraphVScale. rr7NFru) r·rÃrXÚziprÄr;rZpad_trim_top_bottomr3r<r r ) r"r1r2r9r…Úplr±r3Úpr²r5Úrunr%r%r&r;9s.   zGraphVScale.renderN)F) rBrCrDrErrFr'rÁrŽr;r%r%r%r&rÀs   rÀcs‡‡fdd„|DƒS)zJ Return a list of bar values aliased to integer values of maxrow. cs(g|] }ˆtt|ƒˆˆdƒ‘qS)rˆ)r{rŠ)r­Úv©r…rXr%r&r¯]raz$scale_bar_values..r%)rºrXr…r%rÊr&r·Ysr·c@speZdZeegƒZdZeZddd„Z dd„Z e d d „e ƒZ d d „Z e d d „e ƒZddd„Zdd„Zddd„ZdS)Ú ProgressBaru â–�â–Žâ–�▌▋▊▉rédNcCs"||_||_||_||_||_dS)aè :param normal: display attribute for incomplete part of progress bar :param complete: display attribute for complete part of progress bar :param current: current progress :param done: progress amount at 100% :param satt: display attribute for smoothed part of bar where the foreground of satt corresponds to the normal part and the background corresponds to the complete part. If satt is ``None`` then no smoothing will be done. >>> pb = ProgressBar('a', 'b') >>> pb >>> print(pb.get_text()) 0 % >>> pb.set_completion(34.42) >>> print(pb.get_text()) 34 % >>> class CustomProgressBar(ProgressBar): ... def get_text(self): ... return u'Foobar' >>> cpb = CustomProgressBar('a', 'b') >>> print(cpb.get_text()) Foobar >>> for x in range(101): ... cpb.set_completion(x) ... s = cpb.render((10, )) >>> cpb2 = CustomProgressBar('a', 'b', satt='c') >>> for x in range(101): ... cpb2.set_completion(x) ... s = cpb2.render((10, )) N)ÚnormalÚcompleteÚ_currentÚ_donert)r"rÍrÎÚcurrentÚdonertr%r%r&r'gs !zProgressBar.__init__cCs||_| ¡dS)z- current -- current progress N)rÏr+)r"rÑr%r%r&Úset_completionŽszProgressBar.set_completioncCs|jSr()rÏr,r%r%r&r`”razProgressBar.cCs||_| ¡dS)z1 done -- progress amount at 100% N)rÐr+)r"rÒr%r%r&Ú _set_done–szProgressBar._set_donecCs|jSr()rÐr,r%r%r&r`œraFcCsdS)Nr7r%r\r%r%r&r3žszProgressBar.rowscCs,tdtdt|jd|jƒƒƒ}t|ƒdS)zw Return the progress bar percentage text. You can override this method to display custom text. rÌrz %)r‰Úmaxr{rÑrÒÚstr)r"Úpercentr%r%r&r-¡s zProgressBar.get_textc CsÄ|\}t| ¡|jtƒ}| |f¡}t|jƒ||j}t|ƒ}t |j dd|…  dd¡  d¡ƒ}d} |j dur‚t||dƒ} |dksš|dkr®| dkr®|j|fgg|_�n||krÈ|j|fgg|_nø| �r¤t|j d|ƒdk�r¤|j d} |j|   d¡} | d|…| | |dd…|j d<g} |dk�rD|  |j|f¡|  |j t | ƒf¡||ddk�r‚|  |j||df¡| g|_dt |j dƒfgg|_n|j|f|j||fgg|_|S)z* Render the progress bar. rNzutf-8Úignorer‘é r7)rr-Ú text_alignrr;rŠrÑrÒr{r:Z_textÚdecodeÚencodertrÍZ_attrrÎrr°r<Z_cs) r"r1r2r9rÄr5ÚcfZ ccol_dirtyZccolÚcsr²Zcencr=r%r%r&r;©sB ÿý  &  ÿzProgressBar.render)rrÌN)F)F)rBrCrDrErrFr°rrÚr'rÓrcrÑrÔrÒr3r-r;r%r%r%r&rË`s  ' rËc@s2eZdZeegƒZdd„Zd dd„Zd dd„ZdS) Ú PythonLogoc Cs^tddƒ}tddƒ}d}t|df|df|df|df|d f|d f|d f|d fgƒ |f¡|_d S)zd Create canvas containing an ASCII version of the Python Logo and store it. z light blueÚdefaultZyellowéz ______ z _|_o__ |z__ z | _____|z | z |__| z______| z |____o_|N)rrr;Ú_canvas)r"ZbluZyelr@r%r%r&r'Ôs     ûûzPythonLogo.__init__NFcCs|j ¡|j ¡fS)z? Return the size from our pre-rendered canvas. )râr4r3r\r%r%r&r6ãszPythonLogo.packcCst|ƒ|jS)z1 Return the pre-rendered canvas. )rrâr\r%r%r&r;észPythonLogo.render)NF)F) rBrCrDrErrFr'r6r;r%r%r%r&rßÑs  rßcCsddl}| ¡dSr.)ÚdoctestZtestmod)rãr%r%r&Ú_testðsräÚ__main__N)3Z __future__rrZ urwid.compatrrZ urwid.utilrrZ urwid.canvasrr r r r Z urwid.widgetr rrrrrrrrrrrrrZurwid.containerrrZurwid.display_commonrZurwid.decorationrrrGr]rdÚ Exceptionrmrnr’rÀr·rËrßrärBr%r%r%r&Ús2@  ?~Gq