관리-도구
편집 파일: columns.cpython-38.pyc
U &?�f� � @ sD d dl mZ d dlmZ d dlmZ d dlmZmZm Z m Z mZ ddlm Z mZ ddlmZmZmZmZ ddlmZ dd lmZ dd lmZmZ ddlmZ ddlmZ dd lm Z G dd� de �Z!e"dk�r@d dl#Z#e� Zdd� e$e%e#�&� ��D �Z'e!e'dddd�Z(e�)e(� e�*� de(_+e�)e(� de(_,e�*� e�)e(� dS )� )�defaultdict)�chain)� itemgetter)�Dict�Iterable�List�Optional�Tuple� )�Align�AlignMethod)�Console�ConsoleOptions�RenderableType�RenderResult�� Constrain)�Measurement)�Padding�PaddingDimensions)�Table)�TextType)�JupyterMixinc @ sz e Zd ZdZddddddddd�eee eee e e e e ee ee dd� dd�Zedd �d d�Z eeed�d d�ZdS )�Columnsa� Display renderables in neat columns. Args: renderables (Iterable[RenderableType]): Any number of Rich renderables (including str). width (int, optional): The desired width of the columns, or None to auto detect. Defaults to None. padding (PaddingDimensions, optional): Optional padding around cells. Defaults to (0, 1). expand (bool, optional): Expand columns to full width. Defaults to False. equal (bool, optional): Arrange in to equal sized columns. Defaults to False. column_first (bool, optional): Align items from top to bottom (rather than left to right). Defaults to False. right_to_left (bool, optional): Start column from right hand side. Defaults to False. align (str, optional): Align value ("left", "right", or "center") or None for default. Defaults to None. title (TextType, optional): Optional title for Columns. N�r r F)�width�expand�equal�column_first� right_to_left�align�title) �renderables�paddingr r r r r r r! �returnc C sB t |pg �| _|| _|| _|| _|| _|| _|| _|| _| | _ d S �N) �listr"