Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/netmiko/_textfsm/__pycache__/_clitable.cpython-39.pyc
Ðазад
a v�h�7 � @ s� d Z ddlZddlZddlZddlZzddlmZ W n eyN ddlZY n0 ddlZddlm Z G dd� de�ZG dd� de�Z G d d � d e�ZG dd� de�ZG d d� de j�ZdS )a� Google's clitable.py is inherently integrated to Linux: This is a workaround for that (basically include modified clitable code without anything that is Linux-specific). _clitable.py is identical to Google's as of 2017-12-17 _texttable.py is identical to Google's as of 2017-12-17 _terminal.py is a highly stripped down version of Google's such that clitable.py works https://github.com/google/textfsm/blob/master/clitable.py � N)�copyable_regex_object)� _texttablec @ s e Zd ZdZdS )�ErrorzBase class for errors.N��__name__� __module__�__qualname__�__doc__� r r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/netmiko/_textfsm/_clitable.pyr - s r c @ s e Zd ZdZdS )�IndexTableErrorzGeneral INdexTable error.Nr r r r r r 1 s r c @ s e Zd ZdZdS )� CliTableErrorzGeneral CliTable error.Nr r r r r r 5 s r c @ sL e Zd ZdZddd�Zdd� Zdd� Zd d � Zddd�Zd d� Z dd� Z dS )� IndexTableah Class that reads and stores comma-separated values as a TextTable. Stores a compiled regexp of the value for efficient matching. Includes functions to preprocess Columns (both compiled and uncompiled). Attributes: index: TextTable, the index file parsed into a texttable. compiled: TextTable, the table but with compiled regexp for each field. Nc C s4 d| _ d| _|r0|| _t| jd�| _| �||� dS )a Create new IndexTable object. Args: preread: func, Pre-processing, applied to each field as it is read. precompile: func, Pre-compilation, applied to each field before compiling. file_path: String, Location of file to use as input. N�r)�index�compiled�_index_file�open� _index_handle�_ParseIndex)�self�preread� precompile� file_pathr r r �__init__B s zIndexTable.__init__c C s t | d�r| j�� dS )zClose index handle.r N)�hasattrr �close�r r r r �__del__P s zIndexTable.__del__c C s | j jS )z Returns number of rows in table.)r �sizer r r r �__len__U s zIndexTable.__len__c C s4 t � }t| d�r | j|_| j|_| j|_| j|_|S )z'Returns a copy of an IndexTable object.r )r r r r r r )r �cloner r r �__copy__Y s zIndexTable.__copy__c C sL t � }t| d�r,t�| j�|_t|jd�|_t�| j�|_t�| j�|_|S )z+Returns a deepcopy of an IndexTable object.r r ) r r �copy�deepcopyr r r r r )r Zmemodictr! r r r �__deepcopy__e s zIndexTable.__deepcopy__c C s� t �� | _| j�| j� |rF| jD ]"}|jD ]}|||| �||<